Sometimes _getcwd()
returns the parent direcory of the current one, other times returns the folder of the current user.. Has it ever happened to you-all? Thanks in advance
ulisse0 0 Newbie Poster
Recommended Answers
Jump to PostI just double-click on the executable or I run it from VS if I have just modified some line..
Those two ways will generally give different results.
Give us more data and we can give you a complete answer.
Jump to PostThe working (or current) directory does not bear a relation to the starting executable module placement - that's the answer to OP question.
Jump to PostIt seems you misunderstand the notion of a current working directory. That's why you think that GetCurrentDirectory (or _getcwd) has the behavior. They have not. These functions (more precisely, it's GetCurrentDirectory only on Windows because non-standard RTL function _getcwd calls it on Windows) return the correspondent current process property which …
All 10 Replies
MrSpigot 64 Junior Poster
ulisse0 0 Newbie Poster
MrSpigot 64 Junior Poster
ulisse0 0 Newbie Poster
MrSpigot 64 Junior Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
ArkM 1,090 Postaholic
ulisse0 0 Newbie Poster
ulisse0 0 Newbie Poster
ArkM 1,090 Postaholic
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.