Ln Go

c++ 문자열 대문자로 출력 본문

c++

c++ 문자열 대문자로 출력

Ln Ro 2021. 9. 15. 22:31
#include <iostream>
#include <algorithm>
#include <string>

			   
using namespace std;

int main()
{
	string a = "01234567 abcde ABCDE";
	transform(a.begin(), a.end(), a.begin(), 
		[](unsigned char a) {return toupper(a); });

	cout << a;
	return 0;
}

 

'c++' 카테고리의 다른 글

vector 선언 3종류  (0) 2022.06.28
N Queen Algorithm  (0) 2022.02.24
Online Compile Site  (0) 2021.06.03
C++ 2중 for문 등차수열 합 출력  (0) 2021.05.01
비쥬얼 스튜디오 다운로드  (0) 2020.04.13
Comments