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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
ex1.c:5:16: error: 'Nmax' undeclared here (not in a function)
typedef points[Nmax];
^~~~
ex1.c:5:9: warning: type defaults to 'int' in declaration of 'points' [-Wimplicit-int]
typedef points[Nmax];
^~~~~~
ex1.c:6:18: warning: type defaults to 'int' in declaration of 'data' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *n);
^~~~
ex1.c:6:31: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *n);
^
ex1.c:6:41: warning: type defaults to 'int' in declaration of 'y1' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *n);
^~
ex1.c:6:52: warning: type defaults to 'int' in declaration of 'y2' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *n);
^~
ex1.c:7:33: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
float lagrange(float al, points x, points y, int n);
^
ex1.c:7:43: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
float lagrange(float al, points x, points y, int n);
^
ex1.c:9:18: warning: type defaults to 'int' in declaration of 'data' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *pn){
^~~~
ex1.c:9:31: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *pn){
^
ex1.c:9:41: warning: type defaults to 'int' in declaration of 'y1' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *pn){
^~
ex1.c:9:52: warning: type defaults to 'int' in declaration of 'y2' [-Wimplicit-int]
void lire(points data, points x, points y1, points y2, int *pn){
^~
ex1.c: In function 'lire':
ex1.c:17:34: error: subscripted value is neither array nor pointer nor vector
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:43: error: subscripted value is neither array nor pointer nor vector
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:54: error: subscripted value is neither array nor pointer nor vector
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:49: warning: left-hand operand of comma expression has no effect [-Wunused-value]
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:64: error: subscripted value is neither array nor pointer nor vector
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:59: warning: left-hand operand of comma expression has no effect [-Wunused-value]
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:69: error: expected ';' before ')' token
fscanf(pfic, "%f %f %f %f", &data[lig], &x[lig]), &y1[lig], &y2[lig]);
^
ex1.c:17:69: error: expected statement before ')' token
ex1.c:9:18: warning: parameter 'data' set but not used [-Wunused-but-set-parameter]
void lire(points data, points x, points y1, points y2, int *pn){
^~~~
ex1.c:9:31: warning: parameter 'x' set but not used [-Wunused-but-set-parameter]
void lire(points data, points x, points y1, points y2, int *pn){
^
ex1.c:9:41: warning: parameter 'y1' set but not used [-Wunused-but-set-parameter]
void lire(points data, points x, points y1, points y2, int *pn){
^~
ex1.c:9:52: warning: parameter 'y2' set but not used [-Wunused-but-set-parameter]
void lire(points data, points x, points y1, points y2, int *pn){
^~
ex1.c: At top level:
ex1.c:23:33: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
float lagrange(float al, points x, points y, int n){
^
ex1.c:23:43: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
float lagrange(float al, points x, points y, int n){
^
ex1.c: In function 'lagrange':
ex1.c:32:16: error: subscripted value is neither array nor pointer nor vector
L=L*(((al)-x[i])/(x[k]-x[i]));
^
ex1.c:32:23: error: subscripted value is neither array nor pointer nor vector
L=L*(((al)-x[i])/(x[k]-x[i]));
^
ex1.c:32:28: error: subscripted value is neither array nor pointer nor vector
L=L*(((al)-x[i])/(x[k]-x[i]));
^
ex1.c:30:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if(i!=k)
^~
ex1.c:34:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
S=S+L*y[k];
^
ex1.c:34:10: error: subscripted value is neither array nor pointer nor vector
S=S+L*y[k];
^
ex1.c:23:33: warning: parameter 'x' set but not used [-Wunused-but-set-parameter]
float lagrange(float al, points x, points y, int n){
^
ex1.c:23:43: warning: parameter 'y' set but not used [-Wunused-but-set-parameter]
float lagrange(float al, points x, points y, int n){
^
ex1.c: In function 'main':
ex1.c:41:7: error: expected identifier or '(' before '[' token
points[Nmax];
^
ex1.c:44:8: warning: type defaults to 'int' in declaration of 'data' [-Wimplicit-int]
points data, x, y, y1, y2;
^~~~
ex1.c:44:14: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
points data, x, y, y1, y2;
^
ex1.c:44:17: warning: type defaults to 'int' in declaration of 'y' [-Wimplicit-int]
points data, x, y, y1, y2;
^
ex1.c:44:20: warning: type defaults to 'int' in declaration of 'y1' [-Wimplicit-int]
points data, x, y, y1, y2;
^~
ex1.c:44:24: warning: type defaults to 'int' in declaration of 'y2' [-Wimplicit-int]
points data, x, y, y1, y2;
^~
ex1.c:47:23: warning: passing argument 5 of 'lire' makes pointer from integer without a cast [-Wint-conversion]
lire(data, x, y1, y2, n);
^
ex1.c:9:6: note: expected 'int *' but argument is of type 'int'
void lire(points data, points x, points y1, points y2, int *pn){
^~~~
ex1.c:49:6: warning: implicit declaration of function 'lag' [-Wimplicit-function-declaration]
poly=lag(data[1], x, y, n); //on prend le alpha 1 dans la premiere colonne puisque rien ne doit etre saisi au clavier dans le programme
^~~
ex1.c:49:14: error: subscripted value is neither array nor pointer nor vector
poly=lag(data[1], x, y, n); //on prend le alpha 1 dans la premiere colonne puisque rien ne doit etre saisi au clavier dans le programme
^
ex1.c:43:7: warning: variable 'poly' set but not used [-Wunused-but-set-variable]
float poly;
^~~~
ex1.c:42:5: warning: unused variable 'Nmax' [-Wunused-variable]
int Nmax = 10;
^~~~ |