Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Permission denied" "Id returned 1 exit status" mean?

Tags:

c++

c

How do I solve the problem: "Id returned 1 exit status"

#include <stdio.h>
#include<conio.h>
#include<windows.h>
int main()
{
  int P, N, NP=0;
  printf("Introduzca en nombre del producto:\n");
    scanf("%f", &N);
  printf("Introduzca en precio del producto:\n");
    scanf("%f", &P);
  if (P <= 1500)
        NP=P*1.11;
  else 
        NP=P*1.08;
   printf("El producto %d cuesta %d", NP, N);
   getche();
   return 0;
}

The full list of errors is:

Permission denied

Id returned 1 exit status
like image 257
user2755844 Avatar asked Dec 11 '22 11:12

user2755844


1 Answers

It does not have anything to do with code. Your operating system simply does not allow to modify a file while it is in use, so the compilation (actually, linking, ld is the linker) fails, because compiler can't remove the old executable and place a new one. To solve this, simply close all existing processes running that program.

If that won't work, check your permissions for directory the executable is in, or look for any programs that are currently using it (some systems allow programs to place a lock on a file, so no other program can modify it).

like image 149
pampeho Avatar answered Dec 14 '22 02:12

pampeho