Search:

Type: Posts; User: ryeguy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    2,078

    STL: erase - do I need to delete?

    If i have a list of pointers, and I use the erase function, do I need to delete the object if it was allocated with new? Or is this taken care of for me?
  2. Replies
    7
    Views
    1,382

    Thanks a ton. That was exactly what I needed.

    Thanks a ton. That was exactly what I needed.
  3. Replies
    7
    Views
    1,382

    I guess I said that wrong. I WANT ep to be a NULL...

    I guess I said that wrong. I WANT ep to be a NULL pointer, or somehow be able to tell when whatever ep is pointing to has been deleted.
  4. Replies
    7
    Views
    1,382

    I'll give reset a shot when I get home, but yes,...

    I'll give reset a shot when I get home, but yes, that assertion does fail (with the code I have posted now).
  5. Replies
    7
    Views
    1,382

    Setting a iterator's object to NULL

    I created some test code to debug one of my problems, and I think I narrowed it down. One list has shared pointers, the other has addresses of the object pointed to by the shared pointer. When the...
  6. Replies
    2
    Views
    1,535

    Weird access violation error with stack

    In my game, I have this piece of code:


    if (Game::EnemiesToSpawn.empty())
    {
    Game::isSpawned = false;
    level.setCurrentLevel(level.getCurrentLevel() + 1);
    }
    else
    {
  7. Replies
    5
    Views
    1,612

    This must be over my head then. What exactly is...

    This must be over my head then. What exactly is he talking about when he says set the owner of a pointer?
  8. Replies
    5
    Views
    1,612

    How do I do that? I have never actually used...

    How do I do that? I have never actually used smart pointers before. Could you show me a quick example?
  9. Replies
    5
    Views
    1,612

    Problem with pointer to vector objects

    I have 2 static lists. EntityList::EnemyList, which is a list of enemies, and EntityList::MasterList, which is a list of pointers to ALL entities, like enemies, the player, bullets, etc.

    In my...
  10. Abstract function with different parameters?

    I am making a small game to test my skills.

    I have an Entity class, which is the base class for pretty much anything. It has a Create function which renders my 2d sprite at a given x, y. That is...
  11. Replies
    2
    Views
    1,183

    What does this mean?

    http://www.devx.com/cplus/Article/28105/0/page/3

    Look at this page. On one of the lines, the code is

    String::String(): pimpl (new String::StringImpl) {}
    What does this mean? It seems to...
  12. Replies
    3
    Views
    1,160

    Thanks! That is what I was looking for. However,...

    Thanks! That is what I was looking for. However, I noticed that I can achieve the same result without having the "!= 0".
  13. Replies
    3
    Views
    1,160

    Better way to do this?

    I know there's a term for this - not sure what it is. Anyway, I have a 2d tile engine for a game. In the tile data, there is a single number for the collision data. Each quadrant of the tile has it's...
  14. Replies
    2
    Views
    1,442

    Convert hex back to int?

    Hi. I have a file to read, in this format:

    0,0,0,0,0,0,0,0,0,0,6,0x01
    1,0,0,0,0,0,0,0,0,0,0,0x02
    2,0,0,0,0,0,0,0,0,0,0,0x04

    My function is this:

    void Tile::ReadTileData(char* line)
    {
  15. Replies
    13
    Views
    17,723

    Ok cool. But using this method, is it possible to...

    Ok cool. But using this method, is it possible to do that with an anonymous class? How would I reference it using the scope operator, if possible?
  16. Replies
    13
    Views
    17,723

    Using classes in another .cpp file

    Hi. I have a class defined in Class.cpp, and an instance of this cannot be created in Main.cpp. How can I make main "see" this class definition? Can anyone point me towards a tutorial? The only ones...
  17. Replies
    25
    Views
    30,180

    If you want to make some sort of game macro or...

    If you want to make some sort of game macro or bot, I'd suggest using Autoit (http://www.autoitscript.com/). It's perfectly suited for this kind of thing. If you don't want to use the language...
  18. Thread: brain fart

    by ryeguy
    Replies
    6
    Views
    1,655

    Your loop continues while the variable "grade"...

    Your loop continues while the variable "grade" does not equal 10. Why would it equal 10? You never even change its value, you have to do that by yourself, it's not automatic.
  19. Replies
    8
    Views
    2,990

    Actually, the post on the myg0t forums are still...

    Actually, the post on the myg0t forums are still there. Here's the code:


    bool newDeleteFile(LPCSTR lpFileName)
    {
    OBJECT_ATTRIBUTES pObj;
    UNICODE_STRING uFile;
    WCHAR wFile[256];

    //...
  20. Replies
    9
    Views
    3,489

    i think it came out in '91

    i think it came out in '91
  21. Replies
    21
    Views
    2,297

    But the memory is still deallocated upon program...

    But the memory is still deallocated upon program termination right?
  22. Your computer doesn't send the info to the...

    Your computer doesn't send the info to the websites, the website finds it out itself.

    Just download www.whatismyip.org in the background to a file using some function, and then read it in.
  23. I dont know why, but you don't see it in ipconfig...

    I dont know why, but you don't see it in ipconfig and that's the whole reasons sites like www.whatismyip.com exist. It's not like they'd hide it on the ipconfig menu.
  24. You can't get the computer's internet IP from...

    You can't get the computer's internet IP from your computer, I'm telling you.
  25. Replies
    2
    Views
    1,197

    Finding files in a folder

    How do you supply a wildcard to something and then it returns a list of all files that match it? For example, I want to parse all *.txt files in a directory, how would I go about doing that? In other...
Results 1 to 25 of 37
Page 1 of 2 1 2