Blockchain solidity tutorials #54
-
Hi Patrick, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello! Here's the solidity file for that example Could you copy-paste the exact lines that you find difficult to understand? There are two data structure implementations in this solidity example
If you're still confused, you can share the exact lines that you do not understand. Also, you could look at what Arrays and Maps (Dictionaries) data structures are. |
Beta Was this translation helpful? Give feedback.
Hello! Here's the solidity file for that example
https://github.com/PatrickAlphaC/simple-storage-fcc/blob/main/SimpleStorage.sol
Could you copy-paste the exact lines that you find difficult to understand?
There are two data structure implementations in this solidity example
Array - it is an indexed data structure that you can look up using indices starting from 0 up to the nth element. If you try to access an index that doesn't have a People object, it will result in an error. Here you create Objects of People structure (you could think of this as a Class in terms of traditional programming concepts) and this People object has two attributes, name and number. The array simply stores Peo…