I'm using g++ to compile this function:
void first() {
int sth = 5;
void second() {
printf("%d", sth);
}
second();
}
It outprints an error saying:
ISO C++ forbids declaration of `second' with no type
What is the problem? I'm in a big hurry (tommorow is deadline), so please help.
Regards, Lovro
void first() {
int sth = 5;
void second() {
printf("%d", sth);
}
second();
}
It outprints an error saying:
ISO C++ forbids declaration of `second' with no type
What is the problem? I'm in a big hurry (tommorow is deadline), so please help.
Regards, Lovro