fork download
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. void capitalize(string& name2) {
  7. for (short i = 0; i < name2.size(); ++i)
  8. name2[i] = toupper(name2[i]);
  9. }
  10.  
  11. int main() {
  12. string name2 = "brenda";
  13. capitalize(name2);
  14.  
  15. cout << name2 << endl;
  16. }
  17.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
BRENDA