interactive-tutorials
interactive-tutorials copied to clipboard
Issue in de/DynamicAllocation.md malloc & cast
The solution provided by the website is wrong and do not work, because the return value of malloc() need to be casted.
https://github.com/ronreiter/interactive-tutorials/blob/master/tutorials/learn-c.org/de/Dynamic%20allocation.md
could be done like this:
point * mypoint;
mypoint = static_cast<point*>(malloc(sizeof(point)));