Advertisement
Lawnknome

Untitled

Apr 1st, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include "f.h"
  3. #include "g.h"
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8.     f() << endl;
  9.     g() << endl;
  10.     return 0;
  11. }
  12.  
  13. #include "g.h"                                                      //include necessary header file
  14. #include <iostream>
  15.  
  16. void g()
  17. {
  18.     std::cout << "This message is coming from function g." << std::endl;    //output of string
  19. }
  20.  
  21. #include "f.h"                                                      //include necessary header file
  22. #include <iostream>
  23.  
  24. void f()
  25. {
  26.     std::cout << "This message is coming from function f." << std::endl;    //output of string
  27. }
  28.  
  29.  
  30. #ifndef F_H
  31. #define F_H
  32.  
  33. void f();
  34.  
  35. #endif
  36.  
  37. #ifndef G_H
  38. #define G_H
  39.  
  40. void g();
  41.  
  42. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement