Array troubles

Brett.h's Avatar
Light Poster
When i compile and run the program with only this function working, it should assign consecutive line in a document to an array element, but it doesn't print out anything just the "\n" (line 6) no text???

void AI::init(){"greetings.txt");
for (int counter = 0; !test.eof(); counter++){
cout << tests /// this prints out the right output
recognisedStatements[counter] == tests;
cout << recognisedStatements[counter] << "\n"; //this doesn't
xpi0t0s's Avatar, Join Date: Aug 2004
What does the == operator do? Does it assign or does it compare?
Probably your compiler threw a warning at this line - code does nothing, or something along those lines.