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:

Recommended Answers

All 2 Replies

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


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.