Hi, I've been trying to tackle an issue with ifstream/strcpy.
while(File_a != NULL) {
File_a>>FILE_TEXT;
strcpy(COMPLETE, FILE_TEXT);
cout << COMPLETE;
}
I'm trying to extract all the strings out of File a and then copy them into the finished string (COMPLETE) from string (FILE_TEXT) and then write it to the screen. The only problem is that it outputs extra copies of string tokens. For example, if the whole file had "this is a sample." it would output "this is a sample. sample.". I thought it might have to do something with (File_a != NULL), but I'm not sure. Can anyone point me in the right direction?