Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char string1[256], temp[256];
- cin.getline (f,256);
- char *string2[256];
- int i, j, m;
- i = 0;
- j = 0;
- for(j; string1[i] != '\0'; j++)
- {
- m = 0;
- if(temp[i] == '\0')
- i++;
- do
- {
- temp[m] = string1[i];
- m++;
- i++;
- }
- while((f[i] != ' ') || (f[i] != '\0'));
- temp[m] = '\0';
- cout << temp << endl;
- string2[j] = temp;
- cout << string2[j] << endl;
- }
- }
Add Comment
Please, Sign In to add comment