Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main(void)
- {
- std::string s1("Hola");
- std::string s2("HolaMundo");
- std::cout << s1.compare(0, 4, s2, 0, 5) << std::endl;
- std::cout << s2.compare(0, 4, s1) << std::endl;
- std::cout << s2.compare(0, 5, s1.c_str()) << std::endl;
- return EXIT_SUCCESS;
- }
Add Comment
Please, Sign In to add comment