Getting problem here.

3 views
Skip to first unread message

JoeC

unread,
Dec 6, 2005, 2:14:50 PM12/6/05
to C++ Game Programming
I am using the dev C++ compiler and I am trying to write a program
where when I click one mouse button a graphic will appear on the screen
and the other will remove an object.

#include "engine.h"


void make(HWND hwnd){
HDC hdc;
hdc = GetDC(hwnd);

WM_PAINT;

// tank = new Bitmap(hdc, IDB_IMAGE2, g_hin);
// Sprite * ms = new sprite(tank, rcBounds, BA_BOUNCE);
break;

case 4:
// litch = new Bitmap(hdc, IDB_IMAGE3, g_hin);
// Sprite *ms = new sprite(litch, rcBounds, BA_BOUNCE);
break;

#include<windows.h>
#include<windowsx.h>
#include<stdlib.h>
#include <vector>

#include "resources.h"
#include "engine.h"
#include "bitmap.h"
#include "Sprite.h"


using namespace std;

HINSTANCE g_hin;
engine * e;

vector<Sprite>box;

const static int acc = 850;
const static int down = 680;

Bitmap * board;

Bitmap * tank;
Bitmap * litch;
Bitmap * wite;
Bitmap * ball;

I am getting strange errors and stuff isn't working.

22 C:\Documents and Settings\Owner.ROOT\My
Documents\C++\EngineII\action.cpp `tank' undeclared (first use this
function)
22 C:\Documents and Settings\Owner.ROOT\My
Documents\C++\EngineII\action.cpp `Bitmap' has not been declared
22 C:\Documents and Settings\Owner.ROOT\My
Documents\C++\EngineII\action.cpp `IDB_IMAGE2' undeclared (first use
this function)
22 C:\Documents and Settings\Owner.ROOT\My
Documents\C++\EngineII\action.cpp `g_hin' undeclared (first use this
function)

Basically it isaying that these variables have not been declaired but
they have been and they hgave been, what am I doing wrong. Is there
anything that I need to post?

JoeC

unread,
Dec 6, 2005, 2:33:03 PM12/6/05
to C++ Game Programming
NEVERMIND, I figured it out, I had the wrong include.

jakob lin

unread,
Dec 6, 2005, 11:35:34 PM12/6/05
to C-Game-Pr...@googlegroups.com
dude please do not write in capital words "never mind"   it annoy people .


On 12/6/05, JoeC <enk...@yahoo.com> wrote:

NEVERMIND, I figured it out, I had the wrong include.




--
Jakob Lin Mall
Reply all
Reply to author
Forward
0 new messages