Turning argv[0] into an int
This is a basic question I can't find in any books. I am looking for the java eqiv of atoi() in c++. I need to take in a command line argument and use it as a string.
Thanks
Re: Turning argv[0] into an int
uhh... I don't know what "atoi()" does but to turn the command line arguments into a string .. just use a loop that concatenates the separate arguments (but that has little to do with the topic of your question...)
To get one string with the command separated by spaces,
String strArgs;
for (int iLoop = 0;
i < java.lang.reflect.Array.getLength(argv);
i++)
{
strArgs = strArgs + argv[iLoop] + " ";
}
I don't know if this helps ....
Mike