Jump to content



error : id returned 1 exit status, c


Recommended Posts

Γεια σας , 

Προσπαθώ να τρέξω ένα πρόγραμμα στην c, όμως μου εμφανίζει ένα πρόβλημμα : 

  C:\Program Files (x86)\Dev-Cpp\collect2.exe    [Error] ld returned 1 exit status .

Το πρόγραμμά μου είναι το εξής : 

#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<tgmath.h>

int main(void)
{
	FILE* fp;
	double z;
	long int y, Nmax, i ,step;
	int seed = time(NULL);
	
	srand(seed);
	fp=fopen ("RandUniform.dat","w");
	printf ("how many random numbers do you want ?\n");
	scanf("%ld",&step);
	
	y=ceil(step);
	
	for (i=0; y<Nmax; i++)
	{
	z= (rand()%y)*step;
	fprintf(fp,"%ld,%lf,\n",i,z);
	}
fclose (fp);
return 0;	
}

  Μήπως γνωρίζετε τι σημαίνει αυτό το σφάλμα κι πως διορθώνεται ; 

   Σας ευχαριστώ.

 

2016-11-12.png

Edited by Bloommar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.