(Lesson 3) Array instantiation / initializing confusion... #723
-
This is the code I'm looking at now. It runs fine. I just have a question about instantiating new variables in this language. `//SPDX-License-Identifier: MIT import "./NewSolution.sol"; contract StorageFactory {
}` So when you import NewSolution.sol, you're basically importing a contract, which is an object. This is fine. When you write |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hope it clears your questions. |
Beta Was this translation helpful? Give feedback.
@Brentably
NewSolution[] public storageArray;
This is the declaration of an array variable that type is of that contract (in this case).NewSolution storageSolution = new NewSolution();
This is called the initialization of a contract and the whole line is called an object.Hope it clears your questions.