hi im very new at this, so i could appreciate the help
my compiler is borland C++, when i compile the listing i created it return with a string of number shown below, cant quite figure out what it means, although it works, HELP??!!! why does it show 4462652???
F:\C++ Project\windows\Debug_Build\C++ Project.exe
calling expression !
in expression(), before a: 8 b: 9 x: 0 y: 0
after a:9 b: 10 x 19 y 19
4462652
LISTING AS FOLLOW
#include <iostream>
int expression (int a, int b, int x, int y)
{
std::cout << "in expression(), before a: " << a << " b: " << b << " x: " << x << " y: " << y << std::endl;
a=9;
b=10;
x=0;
y = x = a + b;
std::cout <<"\t\t after a:" << a << " b: " << b << " x " << x << " y " << y <<std::endl;
}
First of all, let me express my disgust for Borland over the fact that that even compiled.
expression() should return an int. Since you're not doing so, the compiler seems to have filled the gap for you and made the function return a value of unknown origin.
By the way, using more than one question mark for a single question is not only grammatically incorrect, but also seen as the equivalent of ALL IN CAPS (or at least that's how I read it), which is rude.