microsoft visual c++ path problem

R

Ross

hi all,
i once learnt from you guys to use _getcwd(pathbuffer, 255); with direct.h
included

to get the current path.

it does work to get the path but it still doesn't work in a sense that when
the command locating at the path is called, it doesn't work. i try to add \\
or use "" since the path has several directories and some may have space
characters but it turns out to be futile. any good suggestions?
 
V

Victor Bazarov

Ross said:
hi all,
i once learnt from you guys to use _getcwd(pathbuffer, 255); with direct.h
included

to get the current path.

Really? Too bad. '_getcwd' is not a standard function. Whatever it
does, it must do it in some platform-specific way, which is OT in
comp.lang.c++. At best you ought to learn about it in a newsgroup that
deals with the OS, not here.
it does work to get the path but it still doesn't work in a sense that when
the command locating at the path is called, it doesn't work. i try to add \\
or use "" since the path has several directories and some may have space
characters but it turns out to be futile. any good suggestions?

Well, "good" is a matter of perspective. I'd post this to a newsgroup
that deals with my platform or with my compiler. It's quite possible that
it "doesn't work" due to your misunderstanding of how to use the
information that the function provides, a common mistake. It's also
possible that you can't get your code to do what you want due to some
other mistake. You could post your code here and we could try analysing
it for errors. But be warned that it probably uses some platform-specific
means that are not topical in a language newsgroup.

Oh, and if you're thinking of lashing out on me for telling you that your
question is OT, please don't. I didn't make the rules, I'm just conveying
them to you.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,966
Members
47,516
Latest member
ChrisHibbs

Latest Threads

Top