1 2 3 a
int x, y, z;
char a;
ifstream text("file.txt", ifstream::in);
text >> x >> y >> z >> a;
ifstream.close();
1 2 3 a
int x, y, z;
char a;
ifstream text("file.txt", ifstream::in);
text >> x >> y >> z >> a;
ifstream.close();
int x, y, z; char a;using(var stream = new StreamReader(File.OpenRead("file.txt"))) { var parts = stream.ReadLine.Split(new []{' '}); x = int.Parse(parts[0]); y = int.Parse(parts[1]); z = int.Parse(parts[2]); a = parts[3][0];}
Quote:Original post by 0x0539
Wow, slap in the face lol. Thanks for the enthusiasm though. Now anyone have any ideas how to do this without parsing?
Quote:Original post by 0x0539
Wow, slap in the face lol. Thanks for the enthusiasm though. Now anyone have any ideas how to do this without parsing?