본문 바로가기

프로그래밍/c++ /영상처리

STL- transform()

반응형

String 을 활용하여 대문자로 변환하는 방법이다.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <fstream>
#include <algorithm>
 
using namespace std;
 
int main()
{
    ifstream in("input.txt");
    ofstream out("output.txt");
    string indata;
 
    transform(indata.begin(), indata.end(), indata.begin(), toupper);
 
 
    return 0;
}
cs

 

STL 의 transform algorithm을 사용하였다.

반응형

'프로그래밍 > c++ /영상처리' 카테고리의 다른 글

Ubuntu opencv4 컴파일  (0) 2020.10.16
SW-Maestro 첨부 2 목적지 건물찾기 앱  (0) 2016.05.17
연산자 오버로딩  (0) 2016.02.19
영상의 회전 변환  (0) 2015.10.03
최근방 이웃 보간법  (0) 2015.10.03