Jump to content

  • Log In with Google      Sign In   
  • Create Account


codder88

Member Since 20 Aug 2010
Offline Last Active Aug 28 2013 05:27 AM

Topics I've Started

Basic Transformation

09 February 2013 - 01:02 PM

triangle.png

 

Hello everyone,

 

I have that triangle and I want to move top vertex, how can I do that?


c++ class help

10 November 2010 - 08:09 AM


i have 2 classes


class class1
{
public:
class1(const class2 &c){}
};

class class2
{
public:
class2(){}
};



the compiler give me error because the class2 isn't defined, how to fix that?

CVar system (like quake3 console)

19 October 2010 - 05:29 AM

I want to make a cvar system with registering functions, variables...
I want to know some ideas...

c++ class question

06 September 2010 - 12:55 PM

i have


class ctest
{
public:
CString(const char *str)
{
*this+=str; // crash :S
}
~CString()
{
}

operator+=(const char*str)
{
for(size_t i=0; i<strlen(str); i++)
{
vec.push_back(str[i]);
}
}

private:
vector<char>vec;
};

void print(ctest str)
{
//...
}



When i close the application it crash :S maybe i need to release something?


C++ vector question

06 September 2010 - 07:05 AM


DEVMODE dm;
memset((void*)&dm,0,sizeof(dm));
DWORD dw;

vector<DEVMODE> vec;


while(EnumDisplaySettings(NULL, dw, &dm))
{
vec.push_back(dm);
dw++;
}

// from DEVMODE i need only the resolution but some DEVMODE contain a repeated screen resolution



for example:
i logged the vector and the output is

VIDEOCARD INFO: 640 x 480
VIDEOCARD INFO: 640 x 480
VIDEOCARD INFO: 640 x 480
VIDEOCARD INFO: 640 x 480
VIDEOCARD INFO: 720 x 480
VIDEOCARD INFO: 800 x 600
VIDEOCARD INFO: 800 x 600
VIDEOCARD INFO: 800 x 600
VIDEOCARD INFO: 800 x 600
.....

How to remove the repeated values? there is a function to do this?

PARTNERS