c - "ld returned 1 exit status" and "incompatible implicit declaration of built-in function 'exit' " -


i bored, started study new, in case, c.

i trying basic script in c i'm having error, , don't know wrong.

//tablas  #include <stdio.h>  int main() {      double i, j, p;     int x, y;      printf ("tablas del: ");     scanf ("%i", &x);     printf ("hasta el: ");     scanf ("%i", &y);      file *f;     f = fopen("tablas.txt", "w");     if (f == null) {         printf("no se ha podido abrir/crear/reemplazar el archivo\n\a");         exit(1);     }      printf ("espere mientras se calcula los resulatdos.\n");     system ("del tablas.txt");      (i = x ; <= y ; i++) {         (j = x ; j <= 10 ; j++) {             fprinf(f, "%f x %f = %f\n", i, j, i*j);         }     }     printf ("\nfin\n\a");     system ("pause");     return 0;    } 

you need #include <stdlib.h> exit work.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -