• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

188 Neutral

About sphinx23

  • Rank
  1. What song are you listening to right......

    Hypocrisy - Craving for Another Killing

    First, you want to use [ source ]-tags or [ code ]-tags (without the spaces). This might work, but i haven't tested it. At least it might give you some ideas ;) int remove_char(int j) { for(; j<20;++j ) { encrypt[j]=encrypt[j+1]; } encrypt[20]=0; } int repeats() { int i, j,z; for(i=0;i<21;i++) { for(j=1;j<21;j++) { if(encrypt[j]==encrypt[i]) { remove_char(j); break; } } } return 0; }
  3. Inline assembly help!

    Of course you can pass parameters to functions inside DLLs when using LoadLibrary/GetProcAddress, e.g. typedef IDirect3D9* (WINAPI *ddCreateD3D9t)(UINT); ddCreateD3D9t ddCreateD3D9 = NULL; // get procedure address for Direct3DCreate9: ddCreateD3D9 = (ddCreateD3D9t) GetProcAddress( hD3DInstance, "Direct3DCreate9" ); if( !ddCreateD3D9 ) return 0: // // initialize Direct3D9 // Direct3D9 = ddCreateD3D9( D3D_SDK_VERSION ); if( !Direct3D9 ) return 0; or something similar should work.
  4. You should implement it like this in your .cpp file: void Node::recuriteSoldier(Soldier *pSoldier,Node * pHead, Node *pIterator, Node *pNode) { ... }
  5. MSDN . It uses the debugging output to print the leaks. It also provides some mechanism to track down the memory leaks as it associates an ID to every memory allocation which is also printed out. This ID can be used to identify where the memory was allocated. All in all its a bit long winded i think ;), but it should work.
  6. OT: okonomiyaki: Well, it didn't work in my case ;). The list was printed, an then the destructors were called, which i had verified by putting breakpoints in them. The CRT said there was memory leaked whereas in reality this memory was freed...
  7. Regarding the CRT memory functions: I'm not entirely sure, but when you set the _CRTDBG_LEAK_CHECK_DF flag, some memory blocks may be printed at the program end which are freed later, for example the memory allocated by global objects, which is freed in the object's destructor. The problem is that the CRT memory dump function is called prior to the global object's destructor. So they may not be well suited to search for memory leaks, at least in C++.
  8. Unknown compiler errors

    You have to define the static variables outside of the class, e.g.: class X { static int Y; }; int X::Y = 0; And the constructor (SdlHandle::SdlHandle) seems to have to body (at least not in the code you posted), you also have to define it somewhere, like: SdlHandle::SdlHandle( void ) { // Your code goes here... }
  9. You might want to look up control subclassing, iirc on www.codeproject.com there are a few tutorials. MSDN also has some resources.
  10. Unknown compiler errors

    You try to use some methods and static variables, but you don't seem to define them anywhere, i.e. you have to define SdlHandle::SdlHandle and SdlHandle::m_pInstance.
  11. You need to link to dxguid.lib.
  12. Connecting to msn

    Maybe you want to have a look at the Miranda Instant Messanger .
  13. Windows class

    You have to specify the WinMain function outside of a class. You could do for example: int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { EGWin MyWinClass; return MyWinClass.WinMain( hInstance, hPrevInstance, lpCmdLine, nCmdShow ); } Another possibility would to make the WinMain function static and call it like return EGWin::WinMain( hInstance, hPrevInstance, lpCmdLine, nCmdShow ); You also might want to have a look at this article.
  14. Game Source Code

    Tenebrae , build on top of the Quake source.
  15. Compuware DevPartner Profiler Community Edition
  • Advertisement