0
Does anyone know how make 2d array of struct using file input output?
C++ program
11 Respuestas
0
What do you mean using file input output ?
i can make a 2d array of a structure but how can you make it using the file input output i think you want to say implement it
0
I mean how to make 2d array of struct..and then put it into file input output to be display...
0
You can make a array like this:
typedef struct{
int a;
int b;
}test;
test t[2][2]; //you can just initialise it and use it later
test t[2][2] = {
{{2,4},{5,6}} ,
{{6,8},{4,7}}
}; //Or you can do this
t[0][0].b = 3; //and this too
0
And tell me if you know file handling in c or not
Because I think there is more than one way to do it
And you can do it in the same way as it is done in c
0
I want the 2d array connected to file input output but nevermind I will try using your technique first then I will proceed to the file input output...thanks
0
Tell me first do you know C ?
0
No I don't know...I just learning c++...sorry
0
Ok no problem
Tell me in the massage when you are ready for the file handling
0
I just know the basic..ofstream ifstream that's all
0
Ok
0
https://www.geeksforgeeks.org/file-handling-c-classes/
Take a look at this , this will help you understand how to use file input output in c++