hi everyone = )
i wrote program using C++
it's for type a small letter then it will print it back in a capital letter using file processing
i wrote the letters in txt file in the same c++ folder like this way
a A
b B
c B
and so on ...
this is the program
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
int main()
{
char letter[1];
ifstream file("let.txt",ios::out);
file.close();
ofstream file2("let.txt",ios::in);
if (!file)
{
cout << "Can not Open The File";
exit(1);
}
cout<<"Enter a Letter to Type it as a Capital Letter\n";
cin>>letter;
while (file >> letter)
{
cout<<"enter new letter";
}
cout << "The Capital Letter is :" << file << endl;
return 0;
}
it's print just zeros as out put ..
what's the error with it
thank u for helpin me