OK, Im trying to read a file in, three columns of numbers in all, each column into a seperate array.
Last week I would have done something like:
char filename[25];
std::ifstream afile(filename); //
and then just loop till the end of the file using the >> operator.
But now weve got .NET installed and having my first a attempt at forms and dialouge boxes rather than my usual console stuff. Anyway Im using streamreader to read the file in but cant grab less than a line at a time.
StreamReader* objReader = new StreamReader
String *sLine = "";
sLine = objReader->ReadLine();
Surely I dont have to search through the string for a empty space and then split the string into smaller ones and then convert to a double. There must be a better way. Please enlighten me. Cheers
Apologies for being dim. I promise Ive googled long and hard for the answer...
Last week I would have done something like:
char filename[25];
std::ifstream afile(filename); //
and then just loop till the end of the file using the >> operator.
But now weve got .NET installed and having my first a attempt at forms and dialouge boxes rather than my usual console stuff. Anyway Im using streamreader to read the file in but cant grab less than a line at a time.
StreamReader* objReader = new StreamReader
String *sLine = "";
sLine = objReader->ReadLine();
Surely I dont have to search through the string for a empty space and then split the string into smaller ones and then convert to a double. There must be a better way. Please enlighten me. Cheers
Apologies for being dim. I promise Ive googled long and hard for the answer...