Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax-question : array of pointers...

Status
Not open for further replies.

mamu

Programmer
Sep 6, 2001
20
DE
hi there,

'just ran into a problem compiling following code using msvc6, it worked fine with gcc, any idea why??


//original code: gcc ok, msvc failed
camTrackIco = new (DCamTrackIco*)[m_iCamCount];


it works fine using ...


//ok with msvc
camTrackIco = new DCamTrackIco*[m_iCamCount];


... or doing a typedef for DCamTrackIco* ...

i'm just curious why the original code doesn't work with ms-vc6, it's not really a problem.

thanx, martin
 
no C++ compiller is 100% compatible with some C++ compiller else. Ion Filipski
1c.bmp


filipski@excite.com
 
I've had similar problems and prefer to use typedefs
I also makes the program more readable.

As said no compiler to 100% correct.

Sriks
 
Fine, thanx! Are there any 'style guidelines' how to get 'cross compiler compatible' code??? (no matter what info-source, book, web, etc.)

Martin

(btw. is 'cross compiler compatible' a correct expression, my english isn't as good as i want it to be)...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top