HELLO!
I AM TRYING TO PICK A STRING FROM ONE FILE AND CONVERT IT INTO LOWERCASE LETTERS IN ANOTHER FILE.BUT IT IS OVERWRITING MY PREVIOUS DATA AND PASTING ONLY LAST LETTER OF STRING
PLZ CORRECT IT
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin;
ofstream fout;
void to_upper(char str[])
{
int i =0;
while (str[i]!='\0')
{
if((int(str[i])<123) && (int(str[i])>96))
{
ofstream fout;
fout.open("result1.txt");
fout.put(char(int((str[i])-32)));