i was wondering whenever you create a file in c++ where does it go cuz i've never seen anyone specify the root..

Recommended Answers

All 4 Replies

Member Avatar for iamthwee

Tell me what compiler you are using.

Depends on the operating system. MS-Windows/MS-DOS (and probably *nix) if you don't specify otherwise the file will go in the current working directory where the program was started. If you use MS-Windows use Windows Explorer to search your program's source code directory and you will probably find it there. Or use the search feature to locate it.

>i was wondering whenever you create a file in c++ where does it go
If you don't supply a full path when opening a file, a relative path is used. That depends on how your system deals with relative paths, but I'd wager that you're on a system that uses the current working directory.

k thx

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.