Skip to main content
gamedev.net
🔒 Locked

ColDet

Started by Metallicon Jan 15, 2001 at 2:24 PM 3 replies 750+ views
Original Post
Metallicon
Metallicon
I can''t get ColDet to work!!! I have a game with one main header file and several external header files, all properly included. Also, the LIB file is in the project and the DLL is in the directory, but whenever I put in code like this: CollisionModel3D foobar = newCollisionModel3D(); I either get some stuff about storage-classes or just undeclared identifier. Am I missing a header file with class declarations or something? Please help!!! Suck my rocket
Suck my rocket
+AA_970+
+AA_970+
There should be a space after new and no parenteses, use brackets if you want to create an array.

CollisionModel3D foobar = new CollisionModel3D;

For an array(where x is # of elements):

CollisionModel3D foobar = new CollisionModel3D[x];

Digital Radiation
Metallicon
Metallicon
Doh!
I still get "Undeclared Identifier"
Suck my rocket
+AA_970+
+AA_970+
That means the compiler dosen''t know what CollisionModel3D is. Make sure the header file with that class/struct is included in the source code file.

Digital Radiation
Photon
Photon
You need to include coldet.h
and the code to create a model is:

CollisionModel3D* foobar = newCollisionModel3D();

(No space after the ''new'' and don''t forget the * for the pointer)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.