10 Solved Topics
Remove Filter I'm trying to implement a template class called "Tree", here is the code for the main function: [code=c++] #include "Stack.h" #include <iostream> #include <time.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int gameObjects = 0; Tree<Player>* PlayerTree = new Tree<Player>; Player** players; players = new Player* [5]; Player* … | |
Hello, I am putting together a shoddy game for a 48 hour game contest and I have a problem. When I run the program from within VS2008 (by clicking the start debugging button) the program runs fine. I'm doing this in release mode btw. However, If I try and run … | |
I am not sure why but this code (an attampt at a point and click game engine using Allegro 5) throws up an unhandled exception. The program starts and displays a picture, but as soon as the mouse is moved the exception pops up and the program crashes. I have … | |
Hey all, Just trying to build a program in VS2008 using the Allegro library. When I try to build (debug or release), the build completes, but when the program tries to run, I get an error saying that a file called "MSVCR80D.dll" is missing and suggests reinstalling the program. I … | |
Hi all, I'm trying to build a program in visual studio 2008, when I build in debug mode, it runs just fine, but if I try to build in release mode, there are no errors but when the program runs I get this error: The program can't start because MSVCR90D.dll … | |
I'm trying to read integers in a .txt file into a 2 dimensional array (map). Here is the function: [CODE] void loadmap(int mapnum) { int x; ifstream inFile; inFile.open("level1.txt"); if (!inFile) { cout << "Unable to open file"; //exit(1); // terminate with error } for(int countline = 0; countline <= … | |
I have no idea what is going on here, first, the code: [CODE] #pragma once #include <stdio.h> //#include <stdafx.h> #include <allegro5/allegro.h> //#include <allegro_image.h> class DisplayController { public: int bitmapx; int bitmapy; // ALLEGRO_DISPLAY display; ALLEGRO_BITMAP *crosshairs; ALLEGRO_EVENT ev; ALLEGRO_EVENT_QUEUE *event_queue; void display() { this->event_queue = al_create_event_queue(); al_register_event_source(event_queue, al_get_mouse_event_source()); al_wait_for_event(event_queue, &ev); … | |
I've trawled the internet searchiing for an explaination on how to do this. I'm working on an assignment and we are told to "transmit a whole object to the server". As far as I know, the send function of winsock2 only allows you to send data of type char, so … | |
I have a Tree class that holds pointers to Player objects. Here is the code: [code=c++] #pragma once #include "Player.h" class Tree { private: public: Player* root; Tree(void); ~Tree(void); void DisplayInOrder(Player* localRoot) { if (localRoot != 0) { DisplayInOrder(localRoot->leftChild); localRoot->Display(); DisplayInOrder(localRoot->rightChild); } } Player* Find(const Player* key) { Player * … | |
Hi, I'm trying to run a program I have coded that has the following setup: There is a tree containing "player" objects. Each "player" object has a linked list containing "weapon" objects. Each "weapon" object has a stack containing "round" objects. I need to set it up so that of … |
The End.