Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

~21.7K People Reached
Member Avatar for sblass92

I'm setting up a finite state machine structure as a proof of concept to be used in other projects. The states have function pointers that point to actions they are allowed to perform during certain events and transitions. I'm trying to restrict these pointers to be a part of a …

Member Avatar for sblass92
0
2K
Member Avatar for sblass92

Hi all, To begin, I'm not certain this is the proper place to start this question, but I believe this to be a linux-linker related error rather than a code based one. I've also searched far and wide for a solution online, but others have solved the problem simply include …

Member Avatar for sblass92
0
265
Member Avatar for sblass92

Lets say I have a class A and I also have classes B and C that inherit from class A class A { virtual void foo()=0; //stuff } class B : class A { void foo(); //more specific stuff } class C : class A { void foo(); //more specific …

Member Avatar for sblass92
0
340
Member Avatar for sblass92

Goal is to create a simple class that can be used for GUI buttons. My question is how can I define a function variable, and then when constructing a 'button' define which function should be called when clicked. This obviously isn't right, but just to get the idea: [CODE] class …

Member Avatar for Aranarth
0
157
Member Avatar for sblass92

This question may be somewhat trivial, but I'm stumped none the less. The goal is to create a 'selection box' on the screen such as for selecting units in an rts game. I'll just give the pseudo-code, its the idea that's important main loop is set up as such: [CODE] …

Member Avatar for sblass92
0
145
Member Avatar for sblass92

here's the basic setup: [CODE] #ifndef _GLOBALS #define _GLOBALS #include <list> #include <vector> #include "unit.h" extern std::vector <unit> reserved_units; extern std::list <unit*> active; extern std::vector <unit> generics; #endif [/CODE] [CODE] //globals.cpp #include "globals.h" #include "unit.h" #include <vector> #include <list> vector <unit> generics(15); vector <unit> reserved_units(200); list <unit*> active(0); [/CODE] unit.h …

Member Avatar for sblass92
0
191
Member Avatar for doolsta111

Hi Guys, I am having issues with reading from a list made up of lists. I dont want to paste my code as it is for an assignment, but here is the basic setup. i have a class person that has declared [CODE]list<char> name;[/CODE] push to the list; i have …

Member Avatar for sblass92
0
107
Member Avatar for SacredFootball

hey all. I've been banging my head on this for hours. I'm trying to get only whole numbers from a user and if they input anything different, I want it to display a validation error and restart the function. Here's what I have: I'm either getting an infinite loop of …

Member Avatar for mitrmkar
0
18K
Member Avatar for sblass92

I'm trying to declare a vector as a global variable, and am getting a linker error. I read up on linker problems with multi-file projects, pretty sure I've included the proper headers, used extern, and #ifdef properly, but I can't get it yet. Here is what we have: [CODE] //in …

Member Avatar for sblass92
0
103
Member Avatar for deeprocks31

i want to learn how to insert graphics in C++ pl. help me and suggest some books

Member Avatar for sblass92
0
60
Member Avatar for sblass92

Hi, I'm trying to create a vector array that contains pointers, and these pointers point to objects(particles) that have been created while the program is running. How do I use the appropriate de-reference operator to use functions of the class particle? ex. particle.move(); Here is what I have and my …

Member Avatar for sblass92
0
112
Member Avatar for sblass92

I was just wondering in general the limitations of having moving-game objects stored inside a vector. I was experimenting with general physics where each ball/particle is a class that contains directions and magnitudes of velocity and position. Increasing the number of particles means increasing the iterations of the for loop …

Member Avatar for sblass92
0
130
Member Avatar for sblass92

I'm trying to overload the << operator for a class (easy, right? :P) However, I get the linker error: undefined reference to `operator<<(std::ostream&, particle const&)' Which my understanding means the compiler can't find the implementation for operator<<. I'm not sure whats going on here, since I've already implemented the function. …

Member Avatar for sblass92
0
175
Member Avatar for sblass92

Hey everyone, Browsed through the forums and a C++ book, but can't find what I'm doing wrong. 1)Goal is to pass colors array to a function that picks a color set from 19 options and modifies red, green, and blue to be used in an allegro function. Each color set …

Member Avatar for sblass92
0
754