
newbie question: exporting a string from a function using vc++4
Quote:
> trying to return a string from a function using vc++4,
> #include <string.h>
> using namespace std;
> string myfunc(char *word)
> {
> ......
> ......
> return(out)
> }
> doesnt seem to work, appereantly Im not understanding how to allow a
> function to return a string using c++
"Doesn't seem to work" doesn't give us much to go on, you should always post
the error messages you are getting, but a couple of points:
- does VC++ 4.x even support the standard C++ library? I don't think so, but
I could be wrong.
- the header <string.h> is the header for old-style C functions such as
strvmp etc. not the standard string class - that is in <string>
NeilB