User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 426,517 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 2,051 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: Programming Forums
Views: 1979 | Replies: 2 | Solved
Reply
Join Date: Nov 2004
Posts: 7
Reputation: bajanstar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bajanstar bajanstar is offline Offline
Newbie Poster

I keep getting an error message on my computer called General Protection Exception...

  #1  
Nov 10th, 2004
Hi,
I am very new to this forum and i have a problem with my C assignment. Im using Borland C++ 4.52 and i keep getting an error saying:

General Protection Exception
0x241F:0X41C1
NONAME02(1)0X241F:0X41C1 Processor Fault

It not the computer its the code at least thats what i figured because i tried the same code on 6 pc and the same error pops up.

I will attach the code so that you can have a better understanding of my problem.
Attached Files
File Type: cpp assignme.cpp (1.2 KB, 2 views)
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Location: Overflow State
Posts: 183
Reputation: Stack Overflow is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 4
Stack Overflow's Avatar
Stack Overflow Stack Overflow is offline Offline
C Programmer

Re: I keep getting an error message on my computer called General Protection Exceptio

  #2  
Nov 10th, 2004
Greetings,

A simple fix I saw. In your function gettemps() change:
scanf("%f",temp[i]);
To"
scanf("%f",&temp[i]);
if If you want to store the result of a scanf operation on a standard variable you should precede it with the reference operator, i.e. an ampersand sign (&).


- Stack Overflow
Following the rules will ensure you get a prompt answer to your question. If posting code, please include BB [code][/code] tags. Your question may have been asked before, try the search facility.

IRC
Channel: irc.daniweb.com
Room: #c, #shell
Reply With Quote  
Join Date: Nov 2004
Posts: 7
Reputation: bajanstar is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
bajanstar bajanstar is offline Offline
Newbie Poster

Re: I keep getting an error message on my computer called General Protection Exceptio

  #3  
Nov 16th, 2004
hi,
I didnt even notice that thanks for your help i really appreciate it.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 6:15 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC