Guest_imported
New member
- Jan 1, 1970
- 0
hey there!
im using int's and arrays and saving the to a text file in my program. normally using space or \n as a delimiter to read the ints, i want to read the string/array and ignore the spaces. SO, when i saved to a file i put a '*' (star) on either side of the array. Now i want to read to file using the * as the delimiter that starts/ends the array. so far it looks something like:
char g[100];
while (InFile != NULL)
{
.............
InFile.ignore(1,'*');
InFile.getline(g,101,'*');
.............
}
However, I am not getting the right input when reading....
can anyone help??? thank you for your time.
im using int's and arrays and saving the to a text file in my program. normally using space or \n as a delimiter to read the ints, i want to read the string/array and ignore the spaces. SO, when i saved to a file i put a '*' (star) on either side of the array. Now i want to read to file using the * as the delimiter that starts/ends the array. so far it looks something like:
char g[100];
while (InFile != NULL)
{
.............
InFile.ignore(1,'*');
InFile.getline(g,101,'*');
.............
}
However, I am not getting the right input when reading....
can anyone help??? thank you for your time.