Hey,

I'm currently working on a project and I'm attempting to pass a struct (in particular the height and width of a sprite) between its home class (the enemy) and the new class (the player). Currently however whenever I try to view this number from the new class like this:

ThisIsTheEnemyClass.ThisIsTheEnemyStruct.Width

I get a number that's about negative 858 million! What am I doing wrong here? (Also, those aren't my real names!)

Dude you got to post some more code .....
What is the structure definition ?
How exactly are you passing it ?
How are you printing it ? (The complete statement )

Since I have absolutely no clue as to what exactly is your problem, here is a shot in the dark. Maybe this will solve your problem ?
http://www.java2s.com/Code/C/Structure/Passstructintoafunction.htm

Inspite of the fact the URL says java this is a C code

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.