I need to send the list of the input arguments to readInput function. But the compiler gives error when I call readInput function. Could you please tell me where my mistake is?
bool readInput(netcorr net,int argc, char * argv[]);
int main(int argc, char * const argv[]) {
netcorr net;
bool error=readInput(net, argc, argv);
}
bool readInput(netcorr &net,int argc, char * argv[])
{
}
thanks for your help. Pegah
Edit: The compiler says
Fehler: Argument 3 von »
bool readInput(netcorr, int, char**)« wird initialisiertFehler: ungültige Umwandlung von »char* const*« in »char**«
Translation by aschepler:
Error: Argument 3 of '
bool readInput(netcorr, int, char**)' is initializedError: invalid conversion from 'char* const*' to 'char**'
constbeforeargvinreadInputdefinition*,&, andconstin different places until it worked. Now I'm a Java guy. :-O