Lets say I have textfile with:
hello="yoyo"
how do I get the yoyo in a char[50] variable, without any other text???
Thanks for help!!
This is a discussion on Reading a part of a file within the C++ Programming forums, part of the General Programming Boards category; Lets say I have textfile with: hello="yoyo" how do I get the yoyo in a char[50] variable, without any other ...
Lets say I have textfile with:
hello="yoyo"
how do I get the yoyo in a char[50] variable, without any other text???
Thanks for help!!
What hast thou tried thus far?
Pretend you can only access one character at a time (cin.get()). How might you do it then?
Consider this post signed
I tried:
Code:while( true ) { infile >> textRead[t]; // read a character if( textRead[t]!='"' ) // if that character is a " break; // then stop while loop t++; } infile >> textRead; // read the rest of the sentence cout << textRead; // print the rest of the sentence
Code:if( textRead[t]!='"' ) // if that character is a "
Consider this post signed