Hi guys,
I have just started to learn c++ and I am working with robots. Every program is starting with
main(int argc, char *argv[]) definition . I don't understand what does it mean?I am very glad if somebody canexplain for me .
derbende 0 Newbie Poster
Recommended Answers
Jump to PostIf you just type in
./robot
then you don't need argc or argvBut if you were to type in say
./robot -input=file.txt
then you would need to use argc and argv to read the rest of the command line.
Jump to Post>Can robot be coded in C++
Of course it can.>I thought AI languages like Lisp ,etc are more suitable for that?
Suitable and capable aren't synonyms.
Jump to Postargc and argv are the command line arguments. argc (argument count) is the number of arguments, and argv (argument vector) is an array of strings representing the arguments. These arguments are filled in automatically when the program is run. argv[0] will always be equal to the name of your program, …
Jump to PostIf you need a better explanation, let me know.
Since he hasn't been here since Jan 4th, I wouldn't hold my breath waiting for him.
All 20 Replies
WolfPack 491 Posting Virtuoso Team Colleague
derbende 0 Newbie Poster
Salem 5,265 Posting Sage
kv79 -1 Posting Whiz in Training
ithelp 757 Posting Virtuoso Banned
Sturm commented: Genius -1
Narue 5,707 Bad Cop Team Colleague
ako6626 0 Newbie Poster
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
ako6626 0 Newbie Poster
elsiekins 0 Junior Poster
ako6626 0 Newbie Poster

embooglement
ako6626 0 Newbie Poster
elsiekins 0 Junior Poster
Celtrix -2 Junior Poster in Training
jjwitherspoon 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
artie0525 0 Newbie Poster
ClientAlive 0 Newbie Poster
stephendstump 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.