Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<string>
- char pom (char c)
- {
- c+=1;
- return c;
- }
- void funkcija(std::string &s, char f(char))
- {
- std::string novi="";
- for(int i=0; i<s.size(); i++)
- novi += f(s[i]);
- s = novi;
- }
- int main()
- {
- std::string s = "abcdfg";
- funkcija(s, pom);
- std::cout<<s;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement