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; }

22nd Jan 2019, 5:05 PM
frank
frank - avatar
3 Antworten
+ 2
If you really want to use pointers and dynamic memory allocation: https://code.sololearn.com/cBFqjnWyfOTP/?ref=app
22nd Jan 2019, 7:00 PM
Zen
Zen - avatar
+ 1
https://code.sololearn.com/cSjKpWb2Rkiy/?ref=app
22nd Jan 2019, 5:57 PM
Zen
Zen - avatar
0
Zen is struct Node entity[10]; the same as Node *entity[10] = {*entity};? If not what is the difference?
22nd Jan 2019, 6:09 PM
frank
frank - avatar