Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // in file "main.cpp"
- #include <iostream>
- #include "add.h"
- int main()
- {
- using namespace std;
- cout << "The sum of 3 and 4 is: " << add(3, 4) << endl;
- return 0;
- }
- //in file add.cpp
- int add(int x, int y)
- {
- return x + y;
- }
- //in file add.h
- #ifndef ADD_H
- #define ADD_H
- int add(int x, int y)
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement