Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #define INT 100
- typedef struct _TOTO TOTO;
- void test_func(TOTO* toto, double a);
- struct _TOTO {
- int b;
- int c;
- };
- void test_func(TOTO* toto,double a)
- {
- toto->c=a;
- toto->b=a*INT;
- printf("b=%d\n",toto->b);
- }
- int main(int argc, char* argv[])
- {
- double a=0.1f;
- TOTO* toto = malloc(sizeof(TOTO));
- test_func(toto,a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement