I am writing this code to access a file in eclipse CDT
ifstream inFile;
ofstream outFile;
string next;
inFile.open(\"input.txt\");
if (inFile.fail())
{
Write a test program that creates file, such as "Here_I_Am.txt".
The directory where this is found will be the directory that the executable is using as the default directory.
Add paths to your filename as appropriate, relative to the "Here_I_Am.txt" file. Or put your text file in the same directory as "Here_I_Am.txt"