Search:

Type: Posts; User: SimplyEvert

Search: Search took 0.00 seconds.

  1. Replies
    11
    Views
    2,300

    Thanks a lot for the help! Now it works as...

    Thanks a lot for the help! Now it works as intended. As for your suggestion, it's not really anything that's neccesary since this is a personal game that Im making, but I'll think about changing it :)
  2. Replies
    11
    Views
    2,300

    Ok, so I rewrote the erase function so now it...

    Ok, so I rewrote the erase function so now it looks like this:



    std::vector<Entity*>::iterator Container::erase(std::vector<Entity*>::iterator i){
    mEntity.erase(i);
    return i;
    }
  3. Replies
    11
    Views
    2,300

    It's indeed the line Im refering to that is the...

    It's indeed the line Im refering to that is the right one. But I think I know what the problem is now. I had to make my own erase() function in the container class nad the return type is void. Since...
  4. Replies
    11
    Views
    2,300

    Error 1 error C2679: binary '=' : no...

    Error 1 error C2679: binary '=' : no operator found which takes a right-hand operand of type 'void' (or there is no acceptable conversion)
  5. Replies
    11
    Views
    2,300

    The error is from the line...

    The error is from the line "i=container.erase(i);" hence the red =
  6. Replies
    11
    Views
    2,300

    Delete objects from a vector

    So, I have created my own containerclass that holds a vector. Im using it in a game and when certain objects hits a wall I want them to be erased. Here is the code:



    void Game::aliveTest()
    {
    ...
  7. Replies
    1
    Views
    1,743

    Nvm, I just noticed that Im an idiot......forgot...

    Nvm, I just noticed that Im an idiot......forgot to add ".bmp" to the filename.

    Pls ignore this thread :)
  8. Replies
    1
    Views
    1,743

    Use Allegro BITMAP* in a class

    So, im trying to create a class which uses a BITMAP*. I don't want to send a BITMAP to the constructor since I want the constructor to load the same image every time. The problem is that when I try...
  9. Trying to implement a sound class for a player in a game

    Hey, Im currently working on a game and I'm trying to get sound working. When I try to play a sound outside of the constructor the program break. Here is the code I've written:

    PlayerElme.h ...
Results 1 to 9 of 9