Tại sao điều này?C++ tên nhầm lẫn không gian - std :: vs :: vs no prefix on a call to tolower?
transform(theWord.begin(), theWord.end(), theWord.begin(), std::tolower);
- không hoạt động transform(theWord.begin(), theWord.end(), theWord.begin(), tolower);
- không hoạt động
nhưng
transform(theWord.begin(), theWord.end(), theWord.begin(), ::tolower);
- không làm việc
theWord là một chuỗi. Tôi là using namespace std;
Tại sao nó hoạt động với tiền tố ::
và không phải với số std::
hoặc không có gì?
cảm ơn sự giúp đỡ của bạn.
Bạn đang bao gồm những tệp tiêu đề nào? –
'#include #include #include #include #include #include #include ' –
user839913