JENOVA_SHINRA wrote:
This is how NS2 creates it:
int command(int, const char *const *);
and this is how it uses it :
AODV::command(int argc, const char*const* argv) {
Don't tell me that some software "creates" something which would not compile. :-)
I have no idea what makes you thinking why this code sample has anything to do with yours. Isn't it quite obvious? Your wanna-be-a-function has the name which is the same as the name of the class, which immediately makes it not a valid function. That's why I mentioned a constructor.
Let me tell you what I think: your whole activity is one big abuse: trying to write "code" having no clue of the use of the language you are trying to use. This is just a waste of time, yours and ours. Here, I spend time on answering your questions, but have little hope that you can use the answers, so it would be just the waste. Asking questions of certain type has its prerequisites. Don't start development before you read some C++ book at least once (later on, you can use it as a reference), of course, doing some simple exercises as you go would be very useful.
—SA