RSS Forums RSS
Please support our C++ advertiser: Programming Forums
Views: 1738 | Replies: 1
Reply
Join Date: Jul 2005
Posts: 1
Reputation: truelies is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
truelies truelies is offline Offline
Newbie Poster

class array problem!

  #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?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Posts: 6,585
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 31
Solved Threads: 501
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: class array problem!

  #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  
Reply

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

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:08 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC