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.

0 Endorsements
Ranked #4K
~13.8K People Reached
Favorite Forums
Favorite Tags
c++ x 20
c x 3
Member Avatar for bballmitch

Alright, so im making falling numbers and i need to display points while its running. in the code its keeping track, but i have no way of displaying it. in regular C++ i would just do cout<<score; but in openGL it doesn't work that way as most of you know. …

Member Avatar for TWAT
0
2K
Member Avatar for alone2005

Hi, anyone can tell me what's wrong with my code? the only part has problem is the function overload << operator, any help is welcome. #include <iostream> using namespace std; template <typename T, int SIZE> class array { T data_[SIZE]; array (const array& other); const array& operator = (const array& …

Member Avatar for farag
0
186
Member Avatar for alone2005

When I look at some of my old code I got confused. The code is a bit long so I have to paste part of it only. [code] CArray<CVertex*, CVertex* &> setOfVertex; //CVertex is an object contains x,y,z coordinates CVertex *NewVertex=new CVertex(); NewVertex->Set(1,2,3); //add one object into array setOfVertex.Add(NewVertex); //release …

0
102
Member Avatar for alone2005

I define a class which hold some variables first: [code] class Command{ string cHandle; int numPara; vector<int> cPara; public: Command(); Command(string ucData); //...............more functions here }; //end of class definition [/code] Then I declare an object of Command and wanna store it in a vector [code] vector<Command> cv; Command c; …

Member Avatar for alone2005
0
140
Member Avatar for alone2005

in one file I define [code] void Show(char* s){ string str =" "; str+=s; cout<<str<<endl; } [/code] then in main I call it by [code] char s[100]="Testing..."; //or use *s here, make no difference Show(s); [/code] output nothing but blank. weird?

Member Avatar for alone2005
0
248
Member Avatar for alone2005

Simplify my problem I put a short version of code here, first header file: [code] namespace xxx{ class util{ public: static int MAX_PATH ; util(); static void init(); static void do(void); }; //end class int util::MAX_PATH ; } [/code] cpp file: [code] namespace xxx{ util::util(){ init(); } void util::init(){ MAX_PATH …

Member Avatar for Dave Sinkula
0
247
Member Avatar for alone2005

Potion of my code: [code] class UserCommand{ string cHandle; //definition of command int numPara; vector<int> cPara; //parameter of command public: UserCommand(string ucData); //copy constructor UserCommand(const UserCommand& uc); inline const string getHandle(){return cHandle;}; inline const int getPara(int i){return cPara.at(i);}; inline const int getNumPara(){return numPara;}; //overload operator = here inline UserCommand operator=(UserCommand& …

Member Avatar for alone2005
0
137
Member Avatar for alone2005

if the token is separated by character like ':' or '|' how can you use sstream to tokenize it? << moderator edit: split thread from [thread=27724]here[/thread] >>

Member Avatar for alone2005
0
10K
Member Avatar for dark7angelx07

Hi everyone, I'm having trouble with this program, I hope you can help me with it. I have to write a function that takes an integer value and returns the number with its digits reversed. This is what I have so far...... I will put a [U]*/*[/U] where i need …

Member Avatar for Narue
1
631
Member Avatar for CrazyDieter

In order to provide a simple "garbage collector" for my programs, I'm trying to write a template smart-pointer class, that may be used like that : [code] #include <ref.h> class Foobar{ ....}; ref<Foobar> sample_manipulation(ref<Foobar> in) { ref<Foobar> f=in; //.... return f; } int main(void) { ref<Foobar> f1=new Foobar; ref<Foobar> f2; …

Member Avatar for CrazyDieter
0
180