Hello!
I am having problems to copy the output of a text file to another one. The aim of this small program is to convert a sentence in lowercase stored in a file to uppercase and store the output to another txt file. finally display the output..Plz help me
#include <cstdlib>
#include <iostream>
#include <fstream.h>
using namespace std;
int main()
{
int i ;
char sentence[100];
ifstream streamin;
fstream streamout;
streamin.open("test.txt");
cout<< " The sentence in lowercase letters is: " ;
streamin.getline(sentence,100);
cout<< sentence <<endl;
streamout.open("test2.txt");
cout<< " The sentence in uppercase letters is: " ;
streamin.getline(sentence,100);
for(i=0;sentence[i]!=0;i++)
{ toupper(sentence[i]);
}
ofstream.streamin("test.txt");
system("PAUSE");
return EXIT_SUCCESS;
}
this is where i have reached..