class array problem!

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2005
Posts: 1
Reputation: truelies is an unknown quantity at this point 
Solved Threads: 0
truelies truelies is offline Offline
Newbie Poster

class array problem!

 
0
  #1
Jul 26th, 2005
class array problem.

--------------------------------------------------------------------------------

I encoutered a problem and can't solve it:

in main()
hformation *fdatah;
fdatah=new hformation();

then sent it to a function:
formationinput(vformation *fdatav,hformation *fdatah,ptfilein);


in the function, I redefined this class pointer as an class array:
fdatah=new hformation[7];

passed compile and link, but each time debug to here got error:
Unhandled exception at 0x00433520 in forwardso.exe: 0xC0000005: Access violation reading location 0x00000000.

What's the cause of this problem?
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,567
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 707
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: class array problem!

 
0
  #2
Jul 26th, 2005
By the looks of it, you have several problems. Post more code please, preferably something that we can compile and run as well.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
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