I'm creating a function that will read data from a .txt file I've written and eventually use the data it reads, but I keep receiving an error message that says my file does not exist. I have no clue just where I'm going wrong.
Here's the warning: 1>.\Debug\P5BoycoHeather.exe.intermediate.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
This is my code:
ifstream inputFile("input.txt");
string getPuzzleFromFile() //get the puzzle from the file.
{
char getPuzzleFromFile[50];
There must be file created with data in it for this to work.Is there file present???(you are taking file for input here so input.txt must be present in folder)
It works for me fine.
just a little problem that it will read only a word from file.and there is no word which will 50 characters in size.Thats just waste of memory.If you want a compile line input then use getline() or get().
Yeah I wasn't too sure what to do to get a word from the file so I made the array size 50 characters just in case.
The input.txt file exists, all the information is present in the folder. Might there be a specific way to save it? Not sure if that's a silly question...