This topic is now archived and is closed to further replies.

Spreading code over multiple cpp files

This topic is 5622 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am a begginer to c++ though not to programming in general. One problem I have run in to is how to access a something from one source code to another. In functions, I set the object as a parameter then access it with relative ease but if I have my own object: typedef struct tagCam { float xpos, ypos, zpos; float yrot, lookupdown; } CAM; I have had to place it in both files for CAM to be detected. How can I do it so that I need only to place it in one? Is it through header files? If so I will need a little explaining... Thanks...

Share this post

Link to post
Share on other sites