Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef TEST_H_
- #define TEST_H_
- static const char* const foo[] = {
- "a", "b"
- };
- void foofunc(const char* const strings[]);
- #endif
- ------------------------------------------------------------
- #include <iostream>
- #include "test.h"
- void foofunc(const char* const strings[]) {
- std::cout << std::string(strings[0]) << std::endl;
- }
- ------------------------------------------------------------
- #include "test.h"
- int main() {
- foofunc(foo);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement