View Single Post
  #55  
Old August 18th, 2006, 08:07 PM
PvK's Avatar

PvK PvK is offline
National Security Advisor
 
Join Date: Dec 1999
Posts: 8,806
Thanks: 54
Thanked 33 Times in 31 Posts
PvK is on a distinguished road
Default Re: OT: Stupid c++

It'll use all of 4 bytes if you make it a class static data member, in which case there is only one per class, not per object:

static (STL::vector<cheese>)* pGlobalCheeseVector;

However I guess I'm harping object-oriented design when you are working in a good-ol' C hack design paradigm, which may actually be less confusing for you at this point. If it works and you understand why, it's good code.

main.o is probably an object file. That is, an intermediate file before building the exe. If you delete it, it just means it the compiler will need to recreate it before building the exe, even if you hadn't changed any code in main.cpp before you rebuilt. Generally you can ignore main.o, and you don't need to distribute it to players.

PvK
Reply With Quote