阅读背景:

C ++写入文件中的特定行

来源:互联网 

Right now I am able to read a specific line of a file, but the question is, how can I write on that same specific line in the file? For example, lets say line 1 says "Test", line 2 says "Congratz", Line 3 "Yay", how can I make it where I can replace like 2 with "Yess", or something in the form. Btw the way, in my int main() code, I call readLine(0); and to check if the lines zero, I call if (lineNumber == 0); Thanks in advance! Right now I am able to read a specific line of




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

分享到: