Okay, so I'm fairly decent at coding PERL, i just hate regex, and that's the only thing holding me back from mastering perl. But, this is my first post, which is why i said that, because i do have a little bit of experience programming, probably far from the average user on here lol, butw w/e... moving on.
Okay, I'm heaving a problem moving from a function to another. I could clearly tell, that i was doing it wrong, while making this program, so i decided to stop it, and at least get it to run, without errors, which is what i did. So, please don't make fun of me because its a stupid program/coded poorly. anyways here it is:
Code:
#include "stdio.h"
int guessednumber;
int magicnumber = 32;
int main() {
printf("\nGuess your number: ");
scanf("%d", &guessednumber);
int numberwork;
}
int numberwork() {
if (magicnumber == guessednumber) {
printf("\n\nHoly ...., good job.");
}
else if (magicnumber > guessednumber) {
printf("\nToo Low");
int main();
}
else if ( magicnumber < guessednumber) {
printf("\nToo high.");
int main();
}
}
The functions were originally "main()" and "numberwork()". but i kept getting errors. they said something like "ISO C++ forbids declaring something, blahblahblahblah..." I had the exact error, and i googled it, but only saw stuff about fixing headers, not to mention it was in C++. Oh yeah, and I'm using the MingW compiler, but im probably gonna download GCC tomorrow, cuz its what i used to use in linux. So, yeah, there it is... any help is greatly appreciated, and hopefully i can hang around here and learn a lot of stuff.