본문 바로가기
Blockchain/Crypto Zombies

Making the Zombie Factory - Chapter 5: Structs

by GrayChoi 2024. 2. 6.
반응형

 

Chapter 5: Structs

 

structs allow you to create more complicated data types that have multiple properties

 

Put it to the test

pragma solidity >=0.5.0 <0.6.0;
contract ZombieFactory {
uint dnaDigits = 16;
uint dnaModulus = 10 ** dnaDigits;
struct Zombie {
string name;
uint dna;
}
}

 

 


 

 

구조체는 여러 변수를 그룹화 할 수 있는 사용자 정의 유형이다

반응형

댓글