I would first like to start this post with a sincere Thank you to everyone who has posted and will post help for my problem. Without you guys, I would be banging my head on my desk.
Well, I got another problem. This time with a function that takes a pointer as an input. My teacher has informed me that I must take that pointer or address (I can't remember which it is) and convert it to a string. From then, I need to check the validity of it (between 0 and 100).
Here's the code:
bool GetScore(int *number)
{
bool valid = true;
char buf[30];
int length;
int i = 0;
[B]I know something goes here, I just don't know what. I was thinking "itoa" or something like that.[/B]
cin.getline(buf, 30);
length = strlen(buf);
for (i = 0; i < length; i++)
{
if ((buf[i] < '0') || (buf[i] > '9'))
{
valid = false;
}
}
return valid;
}