How do I read a file thats in a folder, but is in the same folder as the exe.? And how do I do this no matter what folder the root folder is placed in?
CodeBoy101
-2
Junior Poster in Training
Recommended Answers
Jump to Postfirst call getcwd() or _getcwd() to get the current path then concantinate the filename.
Jump to PostThe location of the executable isn't required to be in the current working directory. What OS and compiler are you using?
All 6 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
CodeBoy101
-2
Junior Poster in Training
Narue
5,707
Bad Cop
Team Colleague
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
CodeBoy101
commented:
Perfect!!
+1
TheBeast32
54
Posting Whiz in Training
CodeBoy101
-2
Junior Poster in Training
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.