473,769 Members | 6,799 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dev C++ 'Permission Denied' error on compilation

4 New Member
''permission denied''
''id returned 1 exit status''

im compiling with dev c++ 4.9.9.2
im using windows vista, but i have compiled and ran other programs before.

pretty simple program, some parts in french, just wondering what i have to do fix it.
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <math.h>
  4.  
  5.  
  6. int main()
  7. {
  8.  
  9. int x= 0;                           // declaration des variables et leur donne une valeur de depart "0"
  10. int bande1 = 0;                     // declaration des variables et leur donne une valeur de depart "0"
  11. int bande2 = 0;                     // declaration des variables et leur donne une valeur de depart "0"
  12. int bande3 = 0;                     // declaration des variables et leur donne une valeur de depart "0"
  13. float vresistance = 0;              // declaration des variables et leur donne une valeur de depart "0"
  14. float vresistance2 = 0;             // declaration des variables et leur donne une valeur de depart "0"
  15.  
  16.  
  17. do{
  18.  
  19. printf("\n Voici le tableau des couleurs des bandes, chaque couleur est associe a un numero");
  20. printf("Si tu veut quitter le programme tape (-1) pour la valeur de n'importe bande\n\n");
  21. printf("0-Noir \n" "1-Brun \n" "2-Rouge \n" "3-Orange \n" "4-Jaune \n" "5-Vert \n" "6-Bleu \n" "7-Violet \n" "8-Gris \n" "9-Blanc \n\n\n");
  22.  
  23. printf("Quelle est la valeur de la premiere bande de couleur \n");
  24. scanf("%d",& bande1);
  25.  
  26. while(bande1 > 9 && bande1 < -1){
  27.  
  28.                     if(bande1 == -1)     {
  29.                     system("PAUSE");
  30.                     return(0);           }
  31.  
  32.                     else                 {
  33.                     printf("mauvaise entree , quelle est la valeur de la premiere bande de couleur \n");     
  34.                     scanf("%d",& bande1);}
  35.  
  36.                                 } 
  37.  
  38.  
  39.  
  40.  
  41.  
  42. printf("Quelle est la valeur de la deuxieme bande de couleur \n");
  43. scanf("%d",&bande2);
  44.  
  45. while(bande2 > 9 && bande2 < -1){
  46.  
  47.                     if(bande2 == -1)     {
  48.                     system("PAUSE");
  49.                     return(0);           }
  50.  
  51.                     else                 {
  52.                     printf("mauvaise entree , quelle est la valeur de la deuxieme bande de couleur \n");     
  53.                     scanf("%d",& bande2);}
  54.  
  55.  
  56. printf("Quelle est la valeur de la troisieme bande de couleur \n");
  57. scanf("%d",&bande3);
  58.  
  59. while(bande3 > 9 && bande3 < -1){
  60.  
  61.                     if(bande3 == -1)      {
  62.                     system("PAUSE");
  63.                     return(0);            }
  64.  
  65.                     else                  {
  66.                     printf("mauvaise entree , quelle est la valeur de la troisieme bande de couleur \n");     
  67.                     scanf("%d",& bande3); }
  68.  
  69.                                 }
  70.  
  71. vresistance = ((bande1*10)+(bande2))* pow(10,bande3);
  72.  
  73.             printf("%d",vresistance);
  74.                                      if(vresistance >= 1000){
  75.                                      vresistance2 = vresistance /1000;
  76.                                      printf("la valeur de la resistance(kilo-ohms) est :  %f \n", vresistance2);
  77.                                                              }
  78.                                      else      {
  79.                                      printf("la valeur de la resistance (ohms) est :  %f \n", vresistance);
  80.                                                }
  81. }while(x == 0);
  82.  
  83.       system("PAUSE");
  84.       return 0;
  85.  
  86.  
  87. }
Oct 3 '07 #1
11 29272
ruskalym
65 New Member
What is your working directory?

What path is the target binary in?

The problem may issue from access control restrictions to Program Files directory, thanks to Vista...
Oct 3 '07 #2
weaknessforcats
9,208 Recognized Expert Moderator Expert
Are you using a network drive for your project??

Visual Studio uses a keyboard response file to pass values to the compiler on a separate thread. Often, the sysadmins setup the network so that insufficient permissions exist for that thread to open the keyboard response file on the network drive.
Oct 3 '07 #3
cbderby
4 New Member
What is your working directory?

What path is the target binary in?

The problem may issue from access control restrictions to Program Files directory, thanks to Vista...
C:\Dev-Cpp\Bin

C:\Dev-Cpp\lib
Oct 3 '07 #4
Ganon11
3,652 Recognized Expert Specialist
My guess is there's a bad pointer somewhere that you try and use. It's probably pointing to some garbage location in memory, which is protected by your computer.
Oct 3 '07 #5
Ganon11
3,652 Recognized Expert Specialist
Also, you assign 0 to x as you initialize it. It's also the controller for your do...while loop. When do you change x's value?
Oct 3 '07 #6
cbderby
4 New Member
I never change it, because i want the loop to repeat forever, the only way they can exit the program is by typing -1.
Oct 4 '07 #7
ruskalym
65 New Member
Open properties window of C:\Dev-Cpp\ and try to recursively remove read-only restrictions if it is defined for this folder.
Oct 4 '07 #8
cbderby
4 New Member
Thx alot it works now :)
Oct 4 '07 #9
I found the error!
I found that if there is a file named 'exemplo.c' and an executable 'example.exe', if you delete the text file executable and leaves, when will compile 'exemplo.c' does not work, since there is already a exe in the same directory.

So when you delete delete both. COMPILE AGAIN
Oct 25 '10 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2282
by: Marc | last post by:
Hello, when using flock() I get a permission denied error: Warning: fopen("<filename>", "r+") - Permission denied in <pathtofile> on line 7 I do this: $fileToOpen=substr($PHP_SELF, strrpos($PHP_SELF,"/")+1); $fileHandle=fopen($fileToOpen, 'r+') or die($php_erormsg);
2
2244
by: PM Creyghton | last post by:
I got this error without using frames: First of all, I'm developing an ASP application, and once in a while my activeX components crash or hang, I got page-not-found errors, errors generated by my COM object... Its all in the game of development :).. BUT when some crash occure, and I then try to restart my IIS service or restart my component service, javascript is generating the 'Permission denied error'.
3
3554
by: Colin Graham | last post by:
I am working with a piece of javascript that i have inherited from another developer. It is for a date picker function and it runs fine locally but i get an error when i deploy it on the server and run it. Can anyone help me with my issue i get a permission denied error also when the error begins. i get the error on the folowing part of the codee: window.opener.Form1.txtDate.value = '05/10/2004' The complete line of code is
2
3688
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some comments from the group: ---microsoft.public.sqlserver.odbc-- subject: Permission Denied -- Thanks for help guys I was able to find a trial version of the Enterprise Manager.
3
6144
by: fniles | last post by:
In our ASP page, we call XMLHttp to download XML files. When calling our page using localhost (localhost/myWebSite/myPage.htm), it works, but when calling using the IP address of the web server (xx.x.x.xxx/myWebSite/myPage.htm), I got "Permission denied" error in the HTTP.Open statement. Set http = CreateObject("Microsoft.XmlHttp") http.open "Get", "http://" & "xx.x.x.xxx" & "/XMLFiles/N-1min.xml", ALSE --> permission denied error
1
7013
by: nandakumar.raghu | last post by:
Hi, I have written a javascript function that acceses properties from an activex object. - <OBJECT id="alertObj" classid="clsid:AEE77194-B98F-4E0E-A27F-4AD6B23F0038"></OBJECT> function onLoadfunc()
6
9327
by: Angel | last post by:
I am using coolmenus 4, frames version by DHTMLcentral.com. When I click on any of the submenus, I get an "Permission Denied" error. There after the menus stop working. The cursor on the menu changes to input text kind rather than the normal hand pointer that appears when you mouse over a link. If any of you guys have used Coolmenus please help out. Alteranately, if there are any versions of dropdown menus for frames please let me...
0
1131
by: muthurani | last post by:
hi all, how to resolve the below error, Permission denied error in create object for using excel.application object in asp page. Please help me.i need this now. thanks in advance, muthurani
0
9590
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10223
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10051
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10000
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8879
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3571
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.