This topic is now archived and is closed to further replies.


Quick question on address operators, piece of cake

Recommended Posts

[script] typedef struct BLAH{ int member; }BLAH; ... BLAH bla; function(&bla); ... void function(BLAH *p) { *p.member=333; } [/script] The idea is to pass the address of a struct to a function so that the structure''s members can be altered from within the function. *p should point to the adress [script] int intfigure; int *intpointer; intpointer = &intfigure; *intpointer = 5; /*5 -> address stored in intpointer -> intfigure => intfigure = 5*/ /*That''s what I''m basicly trying to do, except with a structure and inside a function, which apparently holds some different rules*/ [/script] , but the comiler says that "request for member ''whatever'' in something not a structure or a union". So obviously I''m doing somethig wrong... Hope someone has the time to tell me what it is. Thanks.

Share this post

Link to post
Share on other sites