0
Code wont work
I know not a descriptive title but my code keeps outputting "no output" when it should return 1 Code: #include <iostream> using namespace std; struct Node{ float x , y, w, h; float centerX, centerY; int radius = 1; }; struct Nodelist{ Node *entity[10] = {*entity}; }; int main() { Nodelist *neet[3]={*neet}; cout<<neet[1]->entity[3]->radius; return 0; }
3 Answers
+ 2
If you really want to use pointers and dynamic memory allocation:
https://code.sololearn.com/cBFqjnWyfOTP/?ref=app
+ 1
https://code.sololearn.com/cSjKpWb2Rkiy/?ref=app
0
Zen is struct Node entity[10]; the same as Node *entity[10] = {*entity};? If not what is the difference?