반응형

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; } }
구조체는 여러 변수를 그룹화 할 수 있는 사용자 정의 유형이다
반응형
'Blockchain > Crypto Zombies' 카테고리의 다른 글
Making the Zombie Factory - Chapter 4: Math Operations (0) | 2024.02.06 |
---|---|
Making the Zombie Factory - Chapter 3: State Variables & Integers (0) | 2024.02.06 |
Making the Zombie Factory - Chapter 2: Contracts (0) | 2024.02.06 |
댓글