Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #ifndef TEST_H_
  2. #define TEST_H_
  3.  
  4. static const char* const foo[] = {
  5. "a", "b"
  6. };
  7.  
  8. void foofunc(const char* const strings[]);
  9.  
  10. #endif
  11.  
  12. ------------------------------------------------------------
  13.  
  14. #include <iostream>
  15. #include "test.h"
  16.  
  17. void foofunc(const char* const strings[]) {
  18. std::cout << std::string(strings[0]) << std::endl;
  19. }
  20.  
  21. ------------------------------------------------------------
  22.  
  23. #include "test.h"
  24.  
  25. int main() {
  26. foofunc(foo);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement