No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
5 Posted Topics
I am having a problem copying data members from an inherited class to the base class. All of the data is copied except the container data. [CODE] #ifndef NPC_H #define NPC_H /* * Basic parent to all other NPC types. * NOTICE: player is considered an NPC type */ enum … | |
I am in need of clarification. I am still a 'noob' when it comes too C++. I get a lot of the basic stuff except passing arguments. I understand that you can pass by reference and by pointer and by copy. but things start getting really confusing from that point … | |
I am trying to learn how to pass pointers to vectors properly, and having a bit of trouble. I am using Dev-C++ IDE here is the GIRLFRIEND class [CODE]#ifndef GIRLFRIEND_H #define GIRLFRIEND_H #include "player.h" // inheriting class's header file /* * No description */ class GIRLFRIEND : public PLAYER { … | |
I am building a text adventure and hit a snag. I have classes PERSON, PLAYER, COP, & ENEMY. Now PERSON is the main class, and PLAYER, COP, and ENEMY are all sub classes of PERSON all of the function prototypes and definitions work except (2). [CODE]public: WEAPON* GetWeapon(); void SetWeapon(WEAPON … | |
[CODE]struct boardType { int boardNumber[8][7][7]; int numberOfBoards; }; //note: int main() is assumed as standard "bloodshed DEV-C++" compiler boardType totalBoards; totalBoards.numberOfBoards = 8; totalBoards.boardNumber[0] = {{0,0,0,0,0,0,0}, {6,6,6,1,6,6,1}, {6,6,6,6,6,6,1}, {6,6,6,6,6,6,1}, {6,6,6,6,6,6,1}, {6,6,6,6,6,6,1}, {5,5,5,5,5,5,5}};[/CODE][QUOTE]expected primary-expression before '{' token expected ';' before '{' token[/QUOTE] Above shows the script I am trying to make … |
The End.