Skip to main content
gamedev.net
🔒 Locked

MSVC Project using 2 or more cpp files

Started by Archangel 0 replies 350+ views
Original Post
Archangel
Archangel
Hi you, I got a little problem with Microsoft Visual C++ 6.0 . I wrote a programm and added classes with ADD New Class, so that this class is stored in an extra CPP file an gots an extra header. but now I got the problem that I dont know which cpp is compiled first, and if I have to put the #includes in each of the cpp files? cause after i´ve put my initialise class into an extra cpp file, my 3d engine doesnt work any more. Can anyone help me?? Thanx
Ridcully
Ridcully
well, just include every header you need in every cpp file.
to avoid errors due to twice defined symbols, use this in every header file you have

    
#ifndef __HEADER_FILE_NAME_H__
#define __HEADER_FILE_NAME_H__

//header stuff goes here



#endif


i hope this is what you meant

rid

Topic Locked

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

Sign in to reply to this topic.