c++
#include <iostream> #include <vector> std::vector<std::string> wave(std::string str){ std::vector<std::string> returnVal; for(unsigned long i = 0; i < str.size(); ++i){ if(str[i] < 'A' || str[i] > 'z'){ continue; } std::string copy = str; copy[i] -= 32; returnVal.push_back(copy); } return returnVal; } int main(){ for(const auto& word : wave("hello world")){ std::cout << word << std::endl; } return 0; }
from where did you learn that u should use 32 , i didn't know that before Thank you
That's crazy.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
c++
from where did you learn that u should use 32 , i didn't know that before
Thank you
That's crazy.