Hi
if you have a file on c drive under a particular folder how can you open it

ifstream input(filename);

if your file name is available in c drive on myfile folder (filename=" C:\myfile\hi.txt") :idea:

\\ in literal strings = \ because a single \ "escapes" the next character

"C:\\myfile\\hi.txt"

Thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.