728x90
구조체(struct)란 데이터 관련 기능을 캡슐화해놓는 형식이다.
https://codingjin0424.tistory.com/18
[C] 구조체 - 고양이 뽑기 게임
#include #include #include typedef struct { char* name; int age; char* character; int level; } CAT; int collection[5] = { 0,0,0,0,0 }; CAT cats[5]; void initCats(); void printCat(int collect); int c..
codingjin0424.tistory.com
예전에 했던 고양이 뽑기 게임처럼 내가 원하는 고양이의 정보를 모아놓은 구조체를 통해 고양이 정보를 사용할 수 있다.
728x90
'언어 > C#' 카테고리의 다른 글
[C#] 백준 1712번 (0) | 2023.01.10 |
---|---|
[C#] StringBuilder란 (0) | 2023.01.06 |
[C#] 델리게이트 체인(delegate chain) 단순한 예제 (0) | 2022.06.17 |
[C#] 인터페이스(Interface)란? (0) | 2022.06.16 |
[C#] Span이란? (0) | 2022.06.07 |