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
~14.1K People Reached
Favorite Forums
Favorite Tags

10 Posted Topics

Member Avatar for bballmitch

Use a tool called GLFont under ortho view you can output text like [code] glFontBegin(&font); glScalef(8.0, 8.0, 8.0); glTranslatef(30, 30, 0); glFontTextOut("Test", 5, 5, 0); glFontEnd(); glFlush(); [/code] you can find it here [url]http://students.cs.byu.edu/~bfish/glfontdl.php[/url] i remember there is function under opengl who can put text on screen too. Check this: …

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
205
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
106
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
149
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
259
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
265
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
150
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

Dieter your code can't be compiled by me so I use: [code] std::stringstream my_stringstream; my_stringstream << in; string msg = my_stringstream.str(); string msg2= my_stringstream.str(); //something to hold the reversed string int len=0; string::reverse_iterator rit=msg.rbegin(); while (rit<msg.rend()){ msg2[len]=*rit; ++rit; //move one position backwards ++len; } return atol(msg2.c_str()); [/code]

Member Avatar for Narue
1
666
Member Avatar for CrazyDieter

Thanks for the great question and reply. One thing confused me here is, when you do ref<Foobar> f2; f2 is a reference of Foobar object? Or say it is a Foobar's reference, then how can I access x of Foobar? f2.x or (*f2).x apparently won't work.

Member Avatar for CrazyDieter
0
194

The End.