•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 391,951 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,850 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser:
Views: 1152 | Replies: 1
![]() |
| |
•
•
Join Date: Sep 2005
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
People
i am in trouble
whenever i run any c++ program which i have written, the computer shows this error: :mad:
********
General Protection Exception
0x3DCF:0x1E0B
program(1) 0x3DCF:0x1E0B Processor
Fault
********
I use Turbo C++ 4.5 (i am only a 16-year old school student)
this is one of my codes (all of them show the same error):
********
#include<#include.h> //that is my own header file, nothing wrong here
//Checking whether inputted number is an armstrong number
void que();
int check_arm()
{
long digs[100]={0},len=1;unsigned long num,orig;
cout<<"\nEnter number\n";
cin>>num;
orig=num;
for(int i=0;num>0;i++)
{
digs[i]=num%10;
num/=10;
len++;
}
long sum_cubes=0;
for(i=0;i<len;i++)
{
sum_cubes+=pow(digs[i],3);
}
if(orig==sum_cubes)
{return 1;}
else
{return 0;}
}
void main()
{
abc:
getchar();
clrscr();
cout<<"\nProgram to check whether user-given number is an Armstrong number\nEnter a positive integer\n";
int chkr=0;
chkr=check_arm();
if(!chkr)
cout<<"\nNot an Armstrong number";
else
cout<<"\nIs an Armstrong number";
int j=0;char yn;
while(!j)
{
cout<<"\nTry again?(Y/N)\t";
cin>>yn;
switch (yn)
{
case 'Y' : goto abc;
case 'N' : j=1;break;
default : j=0;cout<<"\nError, enter only Y/N please\n";
}
}
cout<<"\nThanks";
}
********
whenever i select Debug>Step over , no error message comes but the
***void main()*** is highlighted in blue
if i compile, it shows success
so i dont think there is anything wrong with my code
if i run it, it gives me this general exception error thing
even if i run a simple ***cout<<"hello world";***, it shows the same thing
so i dont think there is anything wrong with my code
if i run the same code on a friend's computer, the program runs perfectly :mad:
please tell me what to do :!:
i am in trouble
whenever i run any c++ program which i have written, the computer shows this error: :mad:
********
General Protection Exception
0x3DCF:0x1E0B
program(1) 0x3DCF:0x1E0B Processor
Fault
********
I use Turbo C++ 4.5 (i am only a 16-year old school student)
this is one of my codes (all of them show the same error):
********
#include<#include.h> //that is my own header file, nothing wrong here
//Checking whether inputted number is an armstrong number
void que();
int check_arm()
{
long digs[100]={0},len=1;unsigned long num,orig;
cout<<"\nEnter number\n";
cin>>num;
orig=num;
for(int i=0;num>0;i++)
{
digs[i]=num%10;
num/=10;
len++;
}
long sum_cubes=0;
for(i=0;i<len;i++)
{
sum_cubes+=pow(digs[i],3);
}
if(orig==sum_cubes)
{return 1;}
else
{return 0;}
}
void main()
{
abc:
getchar();
clrscr();
cout<<"\nProgram to check whether user-given number is an Armstrong number\nEnter a positive integer\n";
int chkr=0;
chkr=check_arm();
if(!chkr)
cout<<"\nNot an Armstrong number";
else
cout<<"\nIs an Armstrong number";
int j=0;char yn;
while(!j)
{
cout<<"\nTry again?(Y/N)\t";
cin>>yn;
switch (yn)
{
case 'Y' : goto abc;
case 'N' : j=1;break;
default : j=0;cout<<"\nError, enter only Y/N please\n";
}
}
cout<<"\nThanks";
}
********
whenever i select Debug>Step over , no error message comes but the
***void main()*** is highlighted in blue
if i compile, it shows success
so i dont think there is anything wrong with my code
if i run it, it gives me this general exception error thing
even if i run a simple ***cout<<"hello world";***, it shows the same thing
so i dont think there is anything wrong with my code
if i run the same code on a friend's computer, the program runs perfectly :mad:
please tell me what to do :!:
Don't spam the forums, this isn't a chat room. You're lucky I'm in a good mood or I would have deleted this thread too and had you banned for ridiculously inappropriate behavior.
>please tell me what to do
You're using an ancient compiler, probably on a Windows XP system. It's no surprise that you're having trouble. Get a newer compiler, clean up your code, then come back if you're still having problems.
>please tell me what to do
You're using an ancient compiler, probably on a Windows XP system. It's no surprise that you're having trouble. Get a newer compiler, clean up your code, then come back if you're still having problems.
Member of: Beautiful Code Club.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb C++ Marketplace
- general protection error (C++)
- IEXPLORE caused a general protection fault (Web Browsers)
- General Protection Exception Error Please Help! (C++)
- I keep getting an error message on my computer called General Protection Exception... (C++)
Other Threads in the C++ Forum
- Previous Thread: enum range
- Next Thread: Combining multiple programs...activating under anb ift statement??



Hybrid Mode