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;
    cout<< " The sentence in lowercase letters is: " ;
    cout<< sentence <<endl;
    cout<< " The sentence in uppercase letters is: " ;
         {   toupper(sentence[i]);
    return EXIT_SUCCESS;

this is where i have reached..

Ancient Dragon commented: Thanks for taking the time to read the rules and use code tags correctly :) +23

line 3: should be <fstream> (without the .h extension)

line 12: since on line 11 you used ifstream you can use ofstream for the output stream.

line 28: incorrect. should be this: sentence[i] = toupper(sentence[i]); delete line 30 because it does nothing but confuse everything. I suspect what you are attempting to do is write the converted string to the output file. streamout << sentence << "\n";