-
//forget the #include bollocks
-
-
-
int add(int a, int b) {
-
int result;
-
result = a + b;
-
return result;
-
}
-
-
void main() {
-
std::cout << add(1,2);
-
}
-
-
//if you were to compile this properly and put in the various needed #includes (only
for the std::cout) -
//you would see a 3 printed. This is the return valueof the function add.
Posted by Anonymous Mon 15th Jan 2007 20:24 - Syntax is None/text - 26 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
PermaLink to this entry https://pastebin.co.uk/8776
Posted by Anonymous Mon 15th Jan 2007 20:24 - Syntax is None/text - 26 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers