Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct SomeStruct{
- int foo;
- int bar;
- int baz;
- int bat;
- }
- SomeMethod(int a,int wParam, int lParam)
- {
- SomeStruct s;
- // get lParam into SomeStruct
- }
- SomeMethod(int a, int wParam, int lParam)
- {
- SomeStruct *s; //declare struct variable
- s = lParam; //assign integer value as pointer to struct
- printf("the value of s.foo is %d", s.foo); //print result
- }
- SomeStruct* s; //declare pointer-to-struct variable
- s = (SomeStruct*) lParam; //assign integer value as pointer to struct
- printf("the value of s->foo is %d", s->foo); //print result
- SomeMethod(int a, WPARAM wParam, LPARAM lParam)
- {
- SomeStruct *s = (SomeStruct *) lParam;
- printf("the value of s.foo is %d", s.foo); //print result
- }
- struct SomeStruct {
- int foo;
- int bar;
- int baz;
- int bat;
- }
- SomeMethod(int a, int wParam, int lParam)
- {
- SomeStruct *s; //declare struct variable
- s = lParam; //assign integer value as pointer to struct
- printf("the value of s.foo is %d", s.foo); //print result
- }
- struct SomeStruct {
- int foo;
- int bar;
- int baz;
- int bat;
- }
- SomeMethod(int a, int wParam, void *lParam)
- {
- struct SomeStruct *s; //declare struct variable
- s = (struct SomeStruct *)lParam; //assign integer value as pointer to struct
- printf("the value of s.foo is %d", s->foo); //print result
- }
- SomeMethod(int a, int wParam, struct SomeStruct *lParam)
- {
- printf("the value of s.foo is %d", lParam->foo); //print result
- }
Add Comment
Please, Sign In to add comment