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

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Nov 2004
Posts: 7
Reputation: bajanstar is an unknown quantity at this point 
Solved Threads: 0
bajanstar bajanstar is offline Offline
Newbie Poster

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

 
0
  #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)
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 185
Reputation: Stack Overflow is an unknown quantity at this point 
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

 
0
  #2
Nov 10th, 2004
Greetings,

A simple fix I saw. In your function gettemps() change:
  1. 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 Quick reply to this message  
Join Date: Nov 2004
Posts: 7
Reputation: bajanstar is an unknown quantity at this point 
Solved Threads: 0
bajanstar bajanstar is offline Offline
Newbie Poster

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

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

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC