cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
in a i/o program are two arguments in th
in a i/o program are two arguments in the comd line the same as argv ?
May 16, 2012 at 12:50pm UTC
code builder
(24)
in a i/o program are two arguments in the command line the same as argv?
if not what do you use ?
E.G if in the .exe i input 2 and 3 are these
argv[1] and argv[2]
when i'm using input fro ATmega32
May 16, 2012 at 1:38pm UTC
Texan40
(645)
where the main function is: int main(int argc, char **argv)
argc is the number of arguments passed (including the command to run the executable)
argv is an array of cstrings representing the arguments
Example:
>> edit.exe test.txt
argc would be 2, argv[0] would be "edit.exe" and argv[1] would be "test.txt"
Topic archived. No new replies allowed.