[C++] 현재 시간 얻기 12345678910111213time_t tt; time(&tt); tm local = *(localtime(&tt)); int year, month, day;year = 1900 + local.tm_year;month = 1 + local.tm_mon;day = local.tm_mday; unsigned int hour, minute, second, fs;hour = local.tm_hour;minute = local.tm_min;second = local.tm_sec;cs 더보기 [C++] file TO vector string 파일에서 텍스트를 읽어 행이 바뀌는 단위로 vector string을 생성 123456789101112131415161718192021222324252627// Load file and read text line by line, make them as vector string// [INPUT]// >> const std::string _fn file name// [OUTPUT]// >> std::vector& vs_ readed filebool to_vs ( const std::string _fn, std::vector& vs_){ vs_.clear(); std::ifstream fn(_fn); if ( !fn.is_open() ) return false; bool bEOF = false; std::st.. 더보기 [C++] string TO vector string string 형태의 문자열에서 delimeter(구분자)를 기준으로 문자열을 분할하여 vector string으로 변환한다. 123456789101112131415161718192021222324// Convert string to vector string// [INPUT]// >> const std::string& _s input string divied by [delimeter _c]// >> const char delimeter// [OUTPUT]// >> std::vector& vs_ output vector stringvoid to_vs ( const std::string& _s, std::vector& vs_, const char _c){ t::s s; vs_.clear(); for( size.. 더보기 이전 1 2 3 4 다음 목록 더보기