Skip to content

Instantly share code, notes, and snippets.

View mandyedi's full-sized avatar
🙂

Eduard Mandy mandyedi

🙂
View GitHub Profile
@mandyedi
mandyedi / gist:48f1a720e3d0e5e25ef8
Created January 12, 2015 22:38
c++: macro: msvc: print function name, declaration etc.
void testFunction( int &x )
{
std::cout << __FUNCTION__ << std::endl;
std::cout << __FUNCDNAME__ << std::endl;
std::cout << __FUNCSIG__ << std::endl;
x += 3;
}
@mandyedi
mandyedi / gist:75680876bb6a7865188d
Created December 6, 2014 22:27
C++: std::vector: remove multiple element
std::vector<Enemy*>::iterator itEnemy;
for ( itEnemy = v.begin(); itEnemy != v.end(); )
{
if ( (*itEnemy)->GetLife() <= 0 )
{
delete *itEnemy;
itEnemy = v.erase( itEnemy );
}
else
{
@mandyedi
mandyedi / gist:33b700ff4d01d60d1b3a
Last active August 29, 2015 14:10
c++: macro: debug log
#include <iostream>
#define DEBUG 1
void PrintInfo( const char *str )
{
std::cout << str << std::endl;
}
#if DEBUG