#include <cstdlib>
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
ofstream file;
// string a;
string a ("file contents\n\0");
cout<<a<<endl;
file.open("http ://bytes.com/store.txt",ios: :out);
file.write((cha r*)&a,sizeof(a) );
file.flush();
file.close();
system("PAUSE") ;
return EXIT_SUCCESS;
}
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char *argv[])
{
ofstream file;
// string a;
string a ("file contents\n\0");
cout<<a<<endl;
file.open("http ://bytes.com/store.txt",ios: :out);
file.write((cha r*)&a,sizeof(a) );
file.flush();
file.close();
system("PAUSE") ;
return EXIT_SUCCESS;
}
Comment