#include <iostream.h>
#include <stdlib.h>
int main()
{
cout<<getenv("PATH");
return 0;
}//end main
I need to parse the string and print each directory on one line. Can someone point me in the right direction. Thanks in advance
This is a discussion on getenv within the C++ Programming forums, part of the General Programming Boards category; #include <iostream.h> #include <stdlib.h> int main() { cout<<getenv("PATH"); return 0; }//end main I need to parse the string and print ...
#include <iostream.h>
#include <stdlib.h>
int main()
{
cout<<getenv("PATH");
return 0;
}//end main
I need to parse the string and print each directory on one line. Can someone point me in the right direction. Thanks in advance
just parse the string for the '\\' that seperates the directories and then split each one accordingly.
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.