Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, 1 invisible), 583 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to pass typedef pointers to functions? #427151
08/03/13 12:59
08/03/13 12:59
Joined: Nov 2008
Posts: 354
saeculum II
MPQ Offline OP
Senior Member
MPQ  Offline OP
Senior Member

Joined: Nov 2008
Posts: 354
saeculum II
hi,

got the following problem:

I want to pass a typedef pointer in the following way


Code:
MY_TYPEDEF_set (my_typedef)



Code:
void MY_TYPEDEF_set (MY_TYPEDEF *temp) {
  //do anything
}



but I receive an empty pointer error of the engine. Can anybody tell me how I can get it workin?


new project in early stage...

Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
Re: how to pass typedef pointers to functions? [Re: MPQ] #427153
08/03/13 14:50
08/03/13 14:50
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Is my_typedef already a pointer?
If not use &my_typedef to pass the pointer and not the data..
Also please post a bit more code!

Last edited by Ch40zzC0d3r; 08/03/13 14:55.
Re: how to pass typedef pointers to functions? [Re: Ch40zzC0d3r] #427155
08/03/13 15:08
08/03/13 15:08
Joined: Nov 2008
Posts: 354
saeculum II
MPQ Offline OP
Senior Member
MPQ  Offline OP
Senior Member

Joined: Nov 2008
Posts: 354
saeculum II
sry, my_typedef is already a pointer

MY_TYPEDEF *my_typedef = malloc(...)


Last edited by MPQ; 08/03/13 15:20.

new project in early stage...

Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com
Re: how to pass typedef pointers to functions? [Re: MPQ] #427156
08/03/13 15:43
08/03/13 15:43
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
The few lines you have shown so far are utterly meaningless to anyone here. If you don't want us to guess, please provide a short, self contained, correct (compilable), example.

PS: People should also stop writing me PMs so I no longer have to see these threads after reading them


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: how to pass typedef pointers to functions? [Re: WretchedSid] #427159
08/03/13 16:27
08/03/13 16:27
Joined: Nov 2008
Posts: 354
saeculum II
MPQ Offline OP
Senior Member
MPQ  Offline OP
Senior Member

Joined: Nov 2008
Posts: 354
saeculum II
thank you guys, the code is correct, the actual problem hasn't been the passing of the parameter, sorry my mistake!

Last edited by MPQ; 08/03/13 16:27.

new project in early stage...

Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1