can some please explain what are command line parameters ? i read many books, read online didn't understand anything on what they are and when or how to use them. :(
Srinivas0 0 Light Poster
Recommended Answers
Jump to PostWhat exactly did you read, and what exactly didn't you understand? Command line parameters are exceedingly simple, which suggests that you didn't try very hard or are over-complicating things.
Jump to PostHere is another description you can read and maybe not understand. And if that's the case, you need more basic knowledge before you can understand the complexities of command-line parameters.
Jump to Postmain() is a function, a somewhat specialized function, but a function, nonetheless. It has a return type, int, a name, main, and a list of arguments contained within ()s, just like any other function in C++. The two arguments for main() are an int, called argc, and an array of …
Jump to PostBuild the program from within the CodeBlocks IDE.
Start the command line interpreter (Start Menu -> Run... -> cmd on Windows XP ), switch to the directory which contains the executable (typically <Project Directory>\bin\Debug) and run it from the command prompt.
For example: > test.exe how now brown cow
Jump to PostMy ability to detect what "some error" is isn't very good. I can't tell if it's becuase there's a missing ) on line 18 or if it's because you sent the wrong set of arguments to main via the command line, whatever.
If "some error" is something displayed by …
All 20 Replies
Narue 5,707 Bad Cop Team Colleague
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Srinivas0 0 Light Poster
Srinivas0 0 Light Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Srinivas0 0 Light Poster
Lerner 582 Nearly a Posting Maven
Srinivas0 commented: detailed explanation. +2
Srinivas0 0 Light Poster
Srinivas0 0 Light Poster
vijayan121 1,152 Posting Virtuoso
Srinivas0 0 Light Poster
vijayan121 1,152 Posting Virtuoso
Srinivas0 commented: clear explanation on command line parameters +2
Srinivas0 0 Light Poster
Srinivas0 0 Light Poster
Tellalca 19 Posting Whiz in Training
Srinivas0 0 Light Poster

v3ga
Srinivas0 0 Light Poster
Lerner 582 Nearly a Posting Maven
Srinivas0 0 Light 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.