|
//---------------------------------------------------------------------------
#include <cctype>
#include <iostream>
#include <string>
#pragma hdrstop
#include <algorithm>
using namespace std;
//---------------------------------------------------------------------------
#pragma argsused
int main(int argc, char* argv[])
{
string s("The zip code of 38108");
cout << "original : " << s << endl;
transform( s.begin(), s.end(), s.begin(), tolower );
cout << "lowered : " << s << endl;
transform( s.begin(), s.end(), s.begin(), toupper );
cout << "uppered : " << s << endl;
return 0;
}
//---------------------------------------------------------------------------
간단해 보이는데.....
[C++ Error] Unit1.cpp(17): E2285 Could not find a match for 'transform<InputIterator1,InputIterator2,OutputIterator,BinaryOperation>(char *,char *,char *,charT (*)(charT,const locale &))'
맞는 형식을 찾지 못한다는 메세지가 나오네요....
좋은 답변 부탁드립니다.
|