[問題] 關於uva上轉uppercase的問題
看板C_and_CPP (C/C++)作者fftsquall (just only you know)時間15年前 (2011/06/14 23:23)推噓0(0推 0噓 1→)留言1則, 1人參與討論串1/2 (看更多)
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
uva online charge
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<cctype>
#include<algorithm>
問題(Question):
我在寫10010的時候
使用了
std::transform(targetString.begin(), targetString.end(), targetString.begin(), std::toupper);
但是會有compilation error
code.cpp:85: error: no matching function for call to 'transform(__gnu_cxx::__normal_iterator,
但是如果把 std::toupper 換成 ::toupper就會AC
想請問為什麼會這樣
餵入的資料(Input):
預期的正確結果(Expected Output):
錯誤結果(Wrong Output):
程式碼(Code):(請善用置底文網頁, 記得排版)
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.249.91.93
→
06/15 08:34, , 1F
06/15 08:34, 1F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章