thanks that works. since its so short i wont bother to make it into a function. i tried to functionify it once before with my own code and it worked for valid numbers but when i entered an invalid number it stuck in an infinite loop. my piece of code was much longer though. thats why i tried using the bool function instead. i will stick with what you gave me.
moving along, could you explain in simpleton language what the last zero before the ) represents in the last line of code?
also i was wondering how to call a function from another funtion? like in the following simple attempt.
while (test.find_first_not_of("0123456789", 0) != std::string::npos);
i know it dont make sence mathematically, lol but i was trying something simple to help me undertsand it easier. now that gives me an error multiply identifier not found. what i am attempting to do is use the multiply function in the addition function.
using namespace std;
int addition (int a, int b)
r=multiply(a,b) + a;
int multiply (int c, int d)
int y = c+d;
int main ()
z = addition (5,3);
cout << "The result is " << z;