Skip to main content
GameDev.net gamedev.net
šŸ”’ Locked

Command line problem(SOLVED)

Started by yellowstar Mar 6, 2008 at 8:31 PM 1 replies 450+ views
Original Post
yellowstar
yellowstar
I am trying to write a console program which is using the command line. But, it's not working. This:

printf("%s\n",&argv[1]);



Shows this when the program is run:
Quote:
r$=
What it's supposed to display is "Hello"...(Without the quotes)
My Website:link(Not hosted by Gamedev)
SiCrane
SiCrane
printf("%s\n", argv[1]); // no &
yellowstar
yellowstar
Thank's for the fast reply!

It worked!
My Website:link(Not hosted by Gamedev)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.