hello
this is probabley a simple probelm to overcome but i have spent ages trying to figure out what to do and have not got anywhere
i am reading in a file a line at a time e.g
while (! jppfile.eof() ) {
jppfile.getline (buffer,200);
cout << buffer ;
}
where jppfile is a stream, now this works great and i now want to store them (each line) in a vector; simple i thought:
vector <char[200]> instructions; //200 that is how long buffer is
i then proceede to push them onto the vector:
instructions.push_back(buffer);
But this is the error being given to me:
cannot convert from 'const char [200]' to 'char [200]'
I persumed that this is something to do with the fact that bufer is never actually 200 characters long, and the vector is expecting 200 characters so conflict is arising. Is there something obvious that i have missed or is there a solution to the problem that is a bit more complicated
sorry to bother people
cheers