阅读背景:

c++ -如何使用流来解析文件?

来源:互联网 

I have a file and I need to loop through it assigning an int foo, string type, 64/128 bit long. How would I use a stream to parse these lines into the following variables - I want to stick with the stream syntax ( ifs >> foo >> type ) but in this case type would end up being the rest of the line after the 0/52 ... and at that point I'd just get a char* and use strtoull and such so why use the stream in the first place... I'm hoping for readable code without horrid performance over char strings / strtok / strtoull I have a file and I need to loop through it ass




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: