BriTeg

Members
  • Content count

    445
  • Joined

  • Last visited

Community Reputation

168 Neutral

About BriTeg

  • Rank
    Member
  1. C++ class problem

    Quote:but it needs to know about the player and monsters in the battle. Why does it need to know? Something doesn't sound right.
  2. Dev Studio 2005

    What do you get for the $50? Just the express edition? I'm not sure, but I think that would be quite a step down from 2003 Professional. From their website, 2005 Standard is $300 ($200 upgrade), 2005 Professional is $800 ($550 upgrade), and 2005 Team is in the thousands (depending on features wanted). The feature comparison table is here: http://lab.msdn.microsoft.com/vs2005/productinfo/productline/default.aspx
  3. Dev Studio 2005

    Yes, an expiry date when the Beta software turns itself off.
  4. Great, thanks. :) Yes, CreateMutex was what I was looking for. Rating++ :)
  5. Recently there was some good info in here about preventing multiple instances of an app, and specifically why "FindWindow" wasn't the best solution. I can't find that info again, and the search function is disabled. Does anyone know what I'm looking for? Thanks, Brian
  6. Add: #include "resource.h"
  7. New OpenGL Screensaver

    I wrote two screen saver tutorial articles which may help with some of the problems: Screen savers - Starting with Win32 and Screen savers - starting with MFC
  8. Quote: Are you aware that on atleast one popular implementation the size of a pointer to a virtual member function is 16 bytes? No, I wasn't aware of that. Can you provide more detail? Quote: Actually, that is not the case. In both C and C++ you are not allowed to convert a function pointer to a void pointer even though some compilers may allow you to. But isn't a pointer, at its most basic definition, simply a variable that holds a memory address? And that whatever meaning that memory address holds is simply a matter how we conceptualize them? I'm not saying this is remotely good programming practice, but if someone declared a function pointer and a void pointer, could they not use memcpy or whatever to copy the value of the function pointer into the void pointer, and then back again later, and call the function? That's all I really meant with my initial post: is it possible, yes I think so - should you do it, no.
  9. A pointer is a pointer. Yes, you could do it, but no, you should not. :)
  10. I personally thought this was generally a very good thread, except for the heat towards the end. Thinking the original issue through in detail and better understanding what's going on was good for many people, myself included, I'll wager.
  11. New OpenGL Screensaver

    When I run it on its own like an exe, it loads the files (it says "loading textures/..."), but then it just quits. Does the saver use any OpenGL extensions?
  12. Quote: Hello, I made a program in c++ in which I use a ftp coneection. The FTP password and the login are in light in my program ? Is this dangerous ? Can somebody break the exe to see the code ? Is there a solution ? Simply prompt the user for the login and password, instead of hard-coding it (encrypted or not).
  13. Quote:Original post by Zmurf How can I convert an Integer to a character array. I have tride sprintf() and itoa(), but in both caes, it returns a hexidecimal number. This is OK for when my integer is less than 10, but when it exceeds this, it will display as A instead of 10. Anyone have any good functions for converting an int of resonable size to a char array. I need it to be a char array, not a string. Did you use sprintf correctly? int fred = 24382; char buff[100]; sprintf(buff, "%d", fred);
  14. Quote: That's going to create a temporary copy. I know. My point is that you get the same amount of data pushed on the stack behind the scenes with a reference (a pointer so the original var can be dereferenced), so you don't gain anything. If I understand the issue correctly, you gain nothing, but loose a heck-of-a-lot of readability, because every normal person who ever sees your code is going to go "what the heck?" and spend 30 minutes trying to figure out that all you end up with is the equivalent of a const pointer. I think. You're making my head hurt. :)
  15. Quote: What would you do in this situation instead? Would you pass the new parent itself by reference? Just pass the pointer by value, and make it const? Quote: The same reason we pass by constant reference for any object: to prevent a temporary copy being created. But it's handling the dereference behind the scenes (i.e. a pointer goes on the stack anyway), so you don't gain anything (if I understand you correctly).