Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Join Date
    Apr 2005
    Location
    Australia - Melbourne
    Posts
    178

    Question Working on my monkey.

    I'm working on my monkey game - I made the code exactly as it was in the Game Loop VTM up untill timerUpdate. When I compile it in Dev-C++ it gives me the folowing message:


    Permission denied
    ld returned 1 exit status
    C:\Monkey\Makefile.win [Build Error] [Monkey.exe] Error 1
    And when I run Monkey.exe nothing happens.

  2. #2
    Join Date
    Aug 2004
    Location
    little rock arkansas
    Posts
    3,482
    post some code please
    ME WANT AGENTS ME WANT AGENTS ME WANT AGENTS

  3. #3
    Join Date
    Apr 2005
    Location
    Australia - Melbourne
    Posts
    178
    main.cpp

    Code:
    #include "game.h"
    
    int main()
    
    {
        Game gameHeart;
        
        gameHeart.run();
        
        return 0;
    }

    game.h

    Code:
    #ifndef GAME_H
    #define GAME_H
    
    class Game
    {
    public:
           bool run(void);
    
    protected:
              bool getInput(char *c);
    //          void timerUpdate(void);
    
    private:
            double frameCount;
            double startTime;
            double lastTime;
    };
    
    #endif

    game.cpp

    Code:
    #include "game.h"
    #include <conio.h>
    #include <iostream>
    
    using namespace std;
    
    
    bool Game::run(void)
    {
         char key = ' ';
         
         while (key != 'q')
         {
               while (!getInput(&key))
               {
               }
         
         cout << "Here's what you've pressed: " << key << endl;
         }
         
         cout << "End of the game" << endl;
         
         return true;
    }
    
    bool Game::getInput(char *c)
    {
         if (kbhit())
         {
                     *c = getch();
                     return true;
         }
         
         return false;
    }

  4. #4
    Join Date
    Aug 2004
    Location
    little rock arkansas
    Posts
    3,482
    where is your constructor and destructor


    other than that i see nothing wrong
    ME WANT AGENTS ME WANT AGENTS ME WANT AGENTS

  5. #5
    Join Date
    Apr 2005
    Location
    Australia - Melbourne
    Posts
    178
    Does it work ok on your system?

  6. #6
    Join Date
    Oct 2003
    Location
    My little corner of the world
    Posts
    1,460
    check you program manager (or whatever it is called, i'm not on windows right now), you probably have a version of it running, and the linker can create the new .exe because the old is still in use.

    Cheers,
    KM
    "Things are like they are because thats how they are suposed to be"

  7. #7
    Join Date
    Apr 2005
    Location
    Australia - Melbourne
    Posts
    178
    I restarted the computer, compiled but still when I run Monkey.exe nothing happens. It just goes back to dos prompt and I see Monkey.exe in Task Manager as a running process... What am I doing wrong?

  8. #8
    Join Date
    Aug 2003
    Location
    Madrid - Spain
    Posts
    1,153
    Which OS do you have?
    n4x0 -- C++ Programmer
    Tank Game - Progress: 11%

  9. #9
    Join Date
    Apr 2005
    Location
    Australia - Melbourne
    Posts
    178
    Windows XP Pro.

  10. #10
    Join Date
    Aug 2003
    Location
    Madrid - Spain
    Posts
    1,153
    Try to use another compiler
    n4x0 -- C++ Programmer
    Tank Game - Progress: 11%

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •