Agus Terol

Member since: Wednesday, 28 January 2015
Last login: 6 years ago
Profile viewed: 883 views

Your Rank: 80
Points: 14

Agus Terol replied to the topic ''getcwd()' gives path appended with 'Debug'' in the forum. 6 years ago

Hello avelec, which is the full path your executable is placed into? Probably, that directory is not the same than the project directory, and that is why you are getting "Debug" in the path.
It is still unclear to me what you are commenting about those read/write file operations. You can read more about getcwd() function here: http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devwin32/getcwd_xml.html

Read More...

Agus Terol replied to the topic ''getcwd()' gives path appended with 'Debug'' in the forum. 6 years ago

When your program is ran by the IDE, its working directory is where the .exe lives. By default, that directory is \$(Platform)\$(Config). So, for Win32/Debug configuration you have: \Win32\Debug. That is why you get "Debug" at the end of the working directory's path.
I have not tested this on C++Builder 2009. I have used an earlier version instead. Anyway, the same applies, since getcwd() is a Windows' function.
I do not understand what are you doing after calling getcwd(): a piece of code would illustrate this better. But keep in mind that manipulating the string you have obtained will not change the program current working directory. To do so, you need to invoke chdir() Windows' function.

Read More...

Agus Terol is friends with Ivan G681

Joaquin MnMn is friends with Agus Terol

Agus Terol is friends with Luis Navarro

Antonio T is friends with Agus Terol