static void cmd_help(char *dummy)
{
struct command *c;
puts("commands are:");
c = mscp_commands;
do {
printf("%-8s - %s\n", c->name ? c->name : "", c->help);
} while (c++->name != NULL);
}
struct command mscp_commands[] = {
....
};
I am trying to convert a program from C into C++. The qualification is that it compiles through g++;
I am getting this error:
error: use of undeclared identifier 'mscp_commands' c = mscp_commands;
I'm thinking that it has to do something with the function not being able to "see" the struct command. Can someone help please?