I'm having trouble getting useful information out of argv[]. Currently my entry point is this:
int _tmain(int argc, char *argv[]){
if(argc < 2){
std::cout << "Drag and drop AZ or OBJ files onto the exe\n";
std::cin.get();
return 0;
}else{
std::string file = argv[1];
std::cout << file << "\n";
std::cin.get();
import_OBJ(file);
}
std::cin.get();
..........
..........
init();
glutMainLoop();
return 0;
}
Currently my output is simply "E", the drive letter for the file. I assume all the information is there, but I still don't really understand pointers and getting the length of an array. If I loop through the pointer to get chars I'll probably end up with junk from memory.
How can I get the file path?

New Topic/Question
Reply



MultiQuote




|