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? :( :(

By the looks of it, you have several problems. Post more code please, preferably something that we can compile and run as well.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.