From QBASIC to C++

Hi
I have this subprogram in qbasic and I want to convert it in to c++ function.
I need your help to do it.


The sub look like this:
SUB CO2NAS (zt, zp, zhh, zhhh, zvh, zvhh, zR, zs, zss)
STATIC pr%, t(), P(), hh(), hhh(), vh(), vhh(), R(), sh(), shh()
'C*******************************************************************
DIM i AS INTEGER, j AS INTEGER
t = zt + 273.14
IF pr% <> 13 THEN
pr% = 13
ff% = FREEFILE
OPEN "d:\qb64v0954-win\qb64\CO2NAS.DAT" FOR INPUT AS #ff% LEN = 1024
DIM t(15), P(15), hh(15), hhh(15), vh(15), vhh(15), R(15), sh(15), shh(15)
FOR i = 1 TO 15
INPUT #ff%, t(i)
NEXT i

Last edited on
Where did the QBASIC come from?
What does it do?

Do you know QBASIC? Do you know C++? (or C at least?)

Have you tried converting it? It mostly looks pretty easy.
Last edited on
It is interpolation from data file .It looks easy , but I want to know how to read the information from big data files with matrix structure . I have o experience in such cases. If it's easy for you as an expert , I'll appreciate your help.
Is it your QBASIC code?
Do you know QBASIC?
The program seems incomplete since the final IF has no corresponding END IF.
Does that matter?
Yes it is mine !
Thank you . I appreciate your help.
Solved
Topic archived. No new replies allowed.