Files

I have this program and I am doing an IF statement to get it to save a file but i am having trouble understanding why it wont let me, I keep getting error LNX2001 and 1120

This is the bit of code

string saveTextToFile (string, ); // Problem is here when i am defining it.
cout << "Encrypted Text : " << text;
cout << "\nWould you like to save the result to Encypted.txt? <Y or N>: ";
if (answer == 'Y')
{
saveTextToFile(text,"Encrypted.txt");
}

return text;
Last edited on
You forgot the second parameter type when declaring the saveTextToFile function.
I used string as the second one but it doesnt like that so i was wondering if it was something else, it doesnt like file either
Have you defined the function saveTextToFile somewhere?
yeh
What is the exact error? Are you sure the problem is there? Or is the problem having trouble with That function?

Also. Did you include the proper files?
Can you just post your entire code, minus whatever is not relevant to the problem?
Last edited on
Topic archived. No new replies allowed.