Hello there!
this question might be a LONG SHOT but i'll ask anyways.
lets say i have the structures
struct matrix_1 {
string number_1;
string row_1;
string col_1;
}data_1;
struct matrix_2 {
string number_2;
string row_2;
string col_2;
}data_2;
notice the only difference between them are "1" and "2"
i want to store values in both structures, firstly in data_1 and then data_2.
is there anyway by iteration i can store my values into data_n , where n= 1 and then iterate n so afterwards i can store values into data_2
eg...
while (){
//code to store value into data_n.number_n
//code to store value into data_n.col_n
//code to store value into data_n.row_n
n++ ;
}
or do i have to do it the long way?
that is,
store into data_1 and den write over the same code for data_2?
thanks in advance...
this question might be a LONG SHOT but i'll ask anyways.
lets say i have the structures
struct matrix_1 {
string number_1;
string row_1;
string col_1;
}data_1;
struct matrix_2 {
string number_2;
string row_2;
string col_2;
}data_2;
notice the only difference between them are "1" and "2"
i want to store values in both structures, firstly in data_1 and then data_2.
is there anyway by iteration i can store my values into data_n , where n= 1 and then iterate n so afterwards i can store values into data_2
eg...
while (){
//code to store value into data_n.number_n
//code to store value into data_n.col_n
//code to store value into data_n.row_n
n++ ;
}
or do i have to do it the long way?
that is,
store into data_1 and den write over the same code for data_2?
thanks in advance...