Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Plain Text by asdf ( 13 years ago )
#include <iostream>
#include <string>
#include <fstream>
using namespace std;
void wypisz(string n);
int main()
{
string w,n;
ofstream out;
cout<<"wprowadz nazwe pliku"<<endl;
cin>>n;
cout<<endl;
n+=".txt";
out.open(n.c_str());
getline(cin,w);
cout<<"Wprowadzaj wyrazy"<<endl;
while(w.size()<=10)
{
out<<w<<"\t";
getline(cin,w);
}
out.close();
cout<<endl;
wypisz(n);
return 0;
}
void wypisz (string n)
{
string w;
ifstream in;
cout<<"Nazwa pliku "<<n<<endl;
in.open(n.c_str());
while (!in.eof())
{
getline (in,w);
cout<<w<<endl;
}
in.close();
}
Revise this Paste