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

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