The tail end of your program makes little sense
if (char; Y = Y );
{
ofstream myFile("c:/reciet.txt");
// Creates an ofstream object named myFile
if (! myFile) // Always test to see if the file open
{
cout << "Error opening output file" << endl;
return -1;
}
myFile << cout << endl; //prints hello world to the out.txt file
myFile.close(); //closes the file
while( char Y < N)
if (char; Y = Y );
what is it youre trying to do with that. Your if statement has no closing bracket neither does main.
Also you are never changing Y in
while( char Y < N)
N does not exist in your code. you might trying something like declaring char ans; then cin >> ans; then while ( ans == Y)
or something along those lines