NF> Note: The variable is char, and is declared as "matrix[3][25]".
NF> Can someone help me please??? Thanks.
NF> Ps- I have Borland C++ 2.0
first... matrix[3][30] - 25 was not enough.. and they go 0...2, 0...29
// MAXROW will be how many lines in file
// MAXCOL will be the max line length
#include
#include
#include
const int MAXROW=3,MAXCOL=30;
char matrix[MAXROW][MAXCOL];
void main(){
ifstream inFile("C:\\ta");
if (inFile.good()) { // test if it was opened!
for(int i=0;i<3;i++){
inFile.getline(matrix[i],30,'\n');
}
} else
cout << "BAD FILE\n";
return;
}
// have tested it.. it works great.
...
þ CmpQwk #UNREGþ UNREGISTERED EVALUATION COPY
--- FMail/386 1.22
---------------
* Origin: =(Mental Floss)=(913-383-2925)= (1:280/191)
|