Was wondering if anyone could shead some light on the below.
whe creating an instance of an object. Lets say the class type is called CLASSTYPE and I want to create an instance of this classe called FIRSTINSTANCE. The question is: Would there be any reason for me to write it like this.

CLASSTYPE FIRSTINSTANCE(argv[1]);

Why would I use argv[1] at all? I'm not sure why this is done.

Thanks
danny2000

You need to look at the class constructor to see why it need a char*. argv[1] is just whatever you type on the command line folowing the program name.

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.