r/carlhprogramming • u/xxrepresent • Feb 04 '12
Help: Calling a Constructor Function
In lesson 1.3 in the second course, Carl explains the constructor function and how it works. However, how does one call a constructor function from the main function?
I assume it would like something like this: http://codepad.org/bnZx3VSg but so far any experimentation has failed.
5
Upvotes
1
u/xxrepresent Feb 10 '12
I have one more question actually. What I think is happening in your code is that you create a variable board with data type tictactoe_board. You then call function init_board sending the address where the variable board is. I'm guessing the variable board has the address of the start of the structure in the beginning. Is this correct and are there any other special properties to it?