Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<string.h>
- using namespace std;
- #pragma warning(disable:4996)
- int main() {
- char* myStr;
- char* str1;
- cin >> myStr;
- //myStr = new char[strlen(myStr) + 1];
- strcpy(myStr,str1 );
- cout << myStr;
- //str1 = new char[strlen(str1) + 1];
- int i = 0;
- while (myStr[i] != '\0') {
- str1[i] = myStr[i];
- i++;
- }
- str1[i] = '\0';
- cout << str1 << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement