Do you know what the preprocessor does?
It replaces all instances of what you defined with the value.
So this: c= ADD(a,b);
is really: c = for(int i=0;i<100;i++) (a= b+i);
after the preprocessor is done.
Also your return statement will not work. You need a space between the keyword and the '0'.
#include <iostream>
usingnamespace std;
int ADD( int& a, int b )
{
a = b + 99;
return a;
}
int main()
{
int a = 0;
int b = 0;
int c;
c = ADD( a, b );
cout << "a = " << a << endl;
cout << "b = " << b << endl;
cout << "c = " << c << endl;
return 0;
}