코딩Coding/C++_연습
-
C++연습_반복되는 문자 숫자 세기_입력하는거로 수정해야함코딩Coding/C++_연습 2020. 11. 28. 08:42
// Count the number of words on string #include #include int main() { std::string T("Text to verify : How many words does it have?"); size_t NWords = T.empty() || T.back() == ' ' ? 0 : 1; for (size_t s = T.size(); s > 0; --s) if (T[s] == ' ' && T[s - 1] != ' ') ++NWords; std::cout
-
-
-
C++연습_프로그램 실행 폴더 알아내기코딩Coding/C++_연습 2020. 9. 22. 00:07
en.cppreference.com/w/cpp/filesystem/current_path std::filesystem::current_path - cppreference.com Returns or changes the current path. 1-2) Returns the absolute path of the current working directory, obtained as if (in native format) by POSIX getcwd. (2) returns path() if error occurs. 3-4) Changes the current working directory to p, as if by POSIX chd en.cppreference.com 왜 난 안될까 ㅠㅠ