Skip to main content
remove three blank lines
Source Link
Arun
  • 20.6k
  • 12
  • 54
  • 61

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> #include <string> using namespace std; int main() {   string input;   cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input;   return 0;   } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> #include <string> using namespace std; int main() {   string input;   cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input;   return 0;   } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

deleted 56 characters in body
Source Link
ThomasW
  • 531
  • 1
  • 5
  • 10

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

p.s. I am very new to this so please be very patient

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

p.s. I am very new to this so please be very patient

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> #include <string> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

added 23 characters in body
Source Link
ThomasW
  • 531
  • 1
  • 5
  • 10

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm>  #include <string> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

p.s. I am very new to this so please be very patient

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

p.s. I am very new to this so please be very patient

I need to convert a string in C++ to full upper case. I've been searching for a while and found one way to do it:

#include <iostream> #include <algorithm>  #include <string> using namespace std; int main() { string input; cin >> input; transform(input.begin(), input.end(), input.begin(), toupper); cout << input; return 0; } 

Unfortunately this did not work and I received this error message:

no matching function for call to 'transform(std::basic_string::iterator, std::basic_string::iterator, std::basic_string::iterator,

I've tried other methods that also did not work. This was the closest to working.

So what I'm asking is what I am doing wrong. Maybe my syntax is bad or I need to include something. I am not sure.

I got most of my info here: http://www.cplusplus.com/forum/beginner/75634/ (last two posts)

p.s. I am very new to this so please be very patient

Source Link
ThomasW
  • 531
  • 1
  • 5
  • 10
Loading