Reputation: 1416
In objective-c it's easy. Although, in C, you have to call fopen, read, close and all of that jazz. How do you do it in C++?
Upvotes: 0
Views: 499
Reputation: 319
just use the header fstream example:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream file;
file.open("file.txt");
file << "Test!\n";
file.close()
return 0;
}
Upvotes: 3