So far, I've used an alternative function implemented by myself. I realized recently that there is a simpler and easier way to avoiding the effort.
In Visual Studio 2010 and 2008, the use of "ws" is the way to skips white space in the stream.
For example, in order to skip white spaces end of each line of a text file.
fstream imufile;
imufile.open(fname, ios::in);
imufile>>record0>>record1>>ws;
For more information,
http://msdn.microsoft.com/query/dev10.query?appId=Dev10IDEF1&l=KO-KR&k=k(%22ISTREAM%2fSTD%3a%3aWS%22);k(%22STD%3a%3aWS%22);k(WS);k(DevLang-%22C%2B%2B%22);k(TargetOS-WINDOWS)&rd=true
No comments:
Post a Comment