Bonjour,

Voila un peut près ce que je souhaiterai faire, mais ça ne passe pas :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "stdio.h"
 
 
struct _test {
	int x;
	int y;
	int *p;
};
typedef struct _test test;
 
int main()
{
	test ts;
 
	ts.x = 4;
	ts.y = 2;
	ts.p = &ts.y;
 
	printf("%i", add(ts.x, ts.y, ts.p));
 
	return 0;
}
 
int add(int x, int y, int *p)
{
	return x+y+(*p);
}