Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- int main(void)
- {
- char* p = NULL;
- std::string s1(p);
- std::cout << s1 << std::endl;
- const char input[] = "Hola";
- std::string s2(input);
- std::cout << s2.at(4) << std::endl;
- std::vector<char> charvec(5, 'a');
- std::string s3(&charvec[0], 5);
- std::cout << s3 << std::endl;
- std::string s4 (std::string::npos, 'a');
- std::cout << s4 << std::endl;
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment