Static linking vs dynamic linking

Dynamic linking can reduce total resource consumption (if more than one process shares the same library (including the version in “the same”, of course)). I believe this is the argument that drives it its presence in most environments. Here “resources” includes disk space, RAM, and cache space. Of course, if your dynamic linker is insufficiently flexible there is … Read more

Base class undefined

If you have any source file that includes GameObjects.h before ProjectilObject.h or does not include ProjectilObject.h directly, then the compiler will first find the declaration of ProjectilObject through the include in GameObjects.h before knowing what WorldObject is. That is because GameObjects.h first includes ProjectilObject.h and then declares WorldObject. In that case the include of GameObjects.h … Read more

Error: vector does not name a type

I’m having lots of errors in my final project (a poker and black jack sim). I’m using a vector to implement the “hands” in the blackJack class, and I’m using a structured data type declared in another class, which is publicly inherited. The error I’m worried about is the compiler I’m using telling me that … Read more

c++ Read from .csv file

You can follow this answer to see many different ways to process CSV in C++. In your case, the last call to getline is actually putting the last field of the first line and then all of the remaining lines into the variable genero. This is because there is no space delimiter found up until the end of file. Try … Read more