Notice
Recent Posts
Recent Comments
Link
목록포인터vs참조 (1)
오븐 노트
[C++] 포인터 vs 참조
#include using namespace std; struct StatInfo { int hp; int attack; int defence; }; void CreateMonster(StatInfo* info) { info->hp = 100; info->attack = 8; info->defence = 5; } // 특정 조건을 만족하는 몬스터를 찾는 함수 StatInfo* FindMonster() { // TODO : Heap 영역에서 뭔가를 찾아봄 // 발견 시 // return monster~; return nullptr; } // StatInfo globalInfo; // 주소 전달 방식 // [매개변수][RET][지역변수(info)][매개변수(&info)][RET][지역변수] void Prin..
Develop/C++
2022. 7. 10. 21:05