Arrays

Solidity provides three types of data structures: struct, mapping, and arrays.

In our contract, we define a dynamic array to contain all of the bidder addresses. Solidity supports fixed and dynamic sized arrays; therefore, as we don't know the exact number of the bidders a priori, we declare a dynamic array (without fixed length), as follows:

address[] bidders;

An array of a fixed size n and an element type T is declared as T[n], and an array of dynamic size is declared as T[].

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset