Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void wortspiegel(string &text, int pos)
- {
- string tmp_text;
- int end = 0;
- tmp_text = text;
- for (int i = pos; i < text.length(); i++)
- {
- if (!(text[i] >= 'a' && text[i] <= 'z') && !(text[i] >= 'A' && text[i] <= 'Z')) {
- end = i-1;
- break;
- }
- }
- for (int i = pos; i <= end; i++)
- {
- cout << "i: " << i << endl << "das andere:" << end - (i - start) << endl;
- text[i] = text[pos+end-i];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement