Advertisement
Guest User

code stuff

a guest
Mar 27th, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. // in file "main.cpp"
  2. #include <iostream>
  3. #include "add.h"
  4.  
  5. int main()
  6. {
  7. using namespace std;
  8. cout << "The sum of 3 and 4 is: " << add(3, 4) << endl;
  9. return 0;
  10. }
  11.  
  12.  
  13. //in file add.cpp
  14. int add(int x, int y)
  15. {
  16. return x + y;
  17. }
  18.  
  19.  
  20. //in file add.h
  21. #ifndef ADD_H
  22. #define ADD_H
  23.  
  24. int add(int x, int y)
  25.  
  26. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement