Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.(5)

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

ITtutoria

ITtutoria Logo ITtutoria Logo

ITtutoria Navigation

  • Python
  • Java
  • Reactjs
  • JavaScript
  • R
  • PySpark
  • MYSQL
  • Pandas
  • QA
  • C++
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA
Home/ Questions/Steps to fix the error “c++ id returned 1 exit status”.
Next
Answered
Giselle Wilson
  • 7
Giselle Wilson
Asked: May 18, 20222022-05-18T21:01:18+00:00 2022-05-18T21:01:18+00:00In: cpp

Steps to fix the error “c++ id returned 1 exit status”.

  • 7

. Advertisement .

..3..

. Advertisement .

..4..

For the problem “c++ id returned 1 exit status” I tried to fix it, but it doesn’t work and returns the result I want. Here is my program:

#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;
 }

and

*** Start Block *** 
Permission denied Id returned 1 exit status

has occurred. I’ve checked the entire command line but still can’t find the mistake.

c++ id returned 1 exit status
  • 2 2 Answers
  • 56 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook
  • Report

2 Answers

  • Voted
  • Oldest
  • Recent
  • Random
  1. Best Answer
    lyytutoria Expert
    2022-06-26T09:41:24+00:00Added an answer on June 26, 2022 at 9:41 am

    The cause:

    You have got the ”c++ id returned 1 exit status” error because your operating system does not permit file modification while it is active, the compilation (really, linking; ld is the linker) process does not success due to the compiler is unable to replace the existing executable with a new one.

    Solution:

    You can solve this problem by excluding the executable(.exe) files which have existed in your program. However, one thing you need to keep in mind is that you might not be able to delete the outdated.exe file if you compile the code more than once.

    If above way is not effective, you have to check your privilege for directory that contains the executable, or find the programs which are using it at the moment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report
  2. Louise Drouet
    2022-05-25T21:12:35+00:00Added an answer on May 25, 2022 at 9:12 pm

    It has nothing to do with code. The operating system doesn’t allow you to modify files while they are in use. This causes the compilation (actually linking, ld being the linker) to fail. It can’t remove an executable and replace it with a new one. This can be solved by closing all processes that are currently running the program.

    If this doesn’t work, you can check the permissions of the directory where the executable is located, or search for other programs using it. Some systems allow programs lock files so that no other programs can modify them.

    • 20
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

Sidebar

Ask A Question
  • How to Split String by space in C++
  • How To Convert A Pandas DataFrame Column To A List
  • How to Replace Multiple Characters in A String in Python?
  • How To Remove Special Characters From String Python

Explore

  • Home
  • Tutorial

Footer

ITtutoria

ITtutoria

This website is user friendly and will facilitate transferring knowledge. It would be useful for a self-initiated learning process.

@ ITTutoria Co Ltd.

Tutorial

  • Home
  • Python
  • Science
  • Java
  • JavaScript
  • Reactjs
  • Nodejs
  • Tools
  • QA

Legal Stuff

  • About Us
  • Terms of Use
  • Privacy Policy
  • Contact Us

DMCA.com Protection Status

Help

  • Knowledge Base
  • Support

Follow

© 2022 Ittutoria. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.