- #1
zak100
- 462
- 11
I have following C++ statements:
I have converted them into C:
But I can't understand how to declare file_buffer and
how to convert :
in C language.
Similalry, for C++ statements:
is this the correct conversion?
Some body please guide me.
Zulfi.
C++:
ifstream inFile;
inFile >> num_rows;
file_buffer.resize(num_rows);
I have converted them into C:
C:
FILE* inFile;
inFile = fopen(argv[1], "r");
fgets(strNum_rows, 20, inFile);
num_rows = atoi(strNum_rows);
how to convert :
C++:
file_buffer.resize(num_rows);
in C language.
Similalry, for C++ statements:
C++:
send_buffer = new double[num_rows];
is this the correct conversion?
C:
send_buffer = (double *)malloc( num_rows * sizeof(double) );
Some body please guide me.
Zulfi.
Last edited by a moderator: