Please Check at this video I created So you can see what I did wrong

LINK

http://www.freewebtown.com/pcgamers/index-flash.htm

and go to the Download Section and Download My Second Error ! !

If the download doesn't appear Please Refresh the website of the download.

Thanks for the Help :mrgreen:

It's best to assume that we're all overly paranoid. I'm not going to download anything from your site unless you can prove to me that it's completely harmless. The best way to do that is to post code and ask a detailed question about that code here. Otherwise, you probably won't get much help from anyone smart enough to be paranoid.

I did this because The code was to long DUDE is two files

game.cpp and game.h

all well here is the code:::

This is what I have in game.cpp

#include <iostream>
#include <windows.h>
#include <conio.h>

using namespace std;

#define GAME_SPEED 33.33

bool Game::run(void)
{
   drawArea.createSprite( 0, '$' );

   player = new Sprite(&drawArea, 0);

   char key = ' ';

   startTime = timeGetTime();
   frameCount = 0;
   lastTime = 0;
   
   posx = 0;

   while( key != 'q' )
   {

      while( !getInput ( &key ) )
      {

         timerUpdate();

      };

      cout <<"Here's What you Pressed : " << key << endl;

   };

   delete player;

   cout << frameCount / ((timeGetTime() - startTime) / 1000 ) << " fps " << endl;
   cout <<"End Of The Game" << endl;
   
   return true;

};

bool Game::getInput(char *c)
{

   if (kbhit())
   {

      *c = cin.get();
      return true;

   };
   
   return false;

};

bool Game::timerUpdate()
{
   double currentTime = timeGetTime() - lastTime;

   if ( currentTime < GAME_SPEED )
      return;

   player->move( 1, 1 );

   frameCount++;

   lastTime = timeGetTime();

};

<< moderator edit: added code tags: [code][/code] >>


Here is the ERRORS and Warinings


d:\c++\main\main\game.cpp(52) : warning C4996: 'kbhit' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\conio.h(148) : see declaration of 'kbhit'
d:\c++\main\main\game.cpp(69) : error C2561: 'Game::timerUpdate' : function must return a value
d:\c++\main\main\game.h(17) : see declaration of 'Game::timerUpdate'
Build log was saved at "file://d:\C++\Main\Main\Debug\BuildLog.htm"
Main - 1 error(s), 1 warning(s)

> I did this because The code was to long DUDE is two files
That's where you make it smaller so that it's suitable for posting. You know, cut out all of the fluff so that just the necessary stuff and the errors are still there. Most of the time just doing that helps you solve your own problem without posting.

> warning C4996: 'kbhit' was declared deprecated
That's a Microsoft-ism. In their infinite wisdom, the creators of Visual Studio decided to mark random functions as unsafe and deprecate them with this warning. In the real world, nobody cares, so you can ignore that warning.

> error C2561: 'Game::timerUpdate' : function must return a value
This is pretty self explanatory. You say that timerUpdate will return bool, but you don't return anything. Either return true or false, or change the return value to void.

Thanks for the Help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.