Answer to Question #21729 in C++ for saif

Question #21729
what the code to create file that can insert , output and edit the data in file ?
1
Expert's answer
2013-01-09T08:23:00-0500
#include <iostream>

int main(int argc, const char * argv[])
{
FILE *f;
char *FileName = "File.txt";
char *Input = nullptr;

std::cin >> Input;

f = fopen(FileName, "w");
fputs(Input, f);

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS