Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void test(const string& str)
- {
- static const char * const c = str.c_str();
- cout << c << endl;
- }
- int main(int argc, char* argv[])
- {
- test("Hello");
- test("Nooo");
- return 0;
- }
- Hello
- Hello
- Hello
- Nooo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement