Programming/c++(4)
-
[c++] jsoncpp 빌드 및 사용방법
https://github.com/open-source-parsers/jsoncpp open-source-parsers/jsoncpp A C++ library for interacting with JSON. Contribute to open-source-parsers/jsoncpp development by creating an account on GitHub. github.com jsoncpp를 사용하기 위해서 우선 위 사이트로 가서 git 주소를 받아온다. git repository를 받기 위해서 git clone 버튼을 눌러준다. git clone 사용하기 위해서 tortoisegit을 사용한다. copy 한 주소가 자동으로 URL안에 들어가 있게 되는데, 자동으로 들어가있지 않다면 수동으로 git..
2019.05.27 -
union을 사용해서 4byte 인덱스 조합하기
#include union SpawnObjectIndex{public: SpawnObjectIndex(unsigned short regionIndex, unsigned short localIndex) { region = regionIndex; local = localIndex; } unsigned int GetFullIndex() { return FullIndex; } unsigned int GetRegionIndex() { return region; } unsigned int GetLocalIndex() { return local; } private: unsigned int FullIndex; struct { unsigned short local; unsigned short region; };}; vo..
2018.12.04 -
string split
std::vector split(const std::string& s, char delimiter){ std::vector tokens; std::string token; std::istringstream tokenStream(s); while (std::getline(tokenStream, token, delimiter)) { token.erase(std::remove(token.begin(), token.end(), ' '), token.end()); tokens.push_back(token); } return tokens;} int main(){ std::string missionRewardCnt = "5 | 10 | 18"; std::vector result = split(missionReward..
2018.11.21 -
rvalue 참조 사이트
http://shaeod.tistory.com/455
2017.02.17