Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Xenon 2000 project pcf

Reply
Thread Tools

Xenon 2000 project pcf

 
 
A.J.B 2.K.3
Guest
Posts: n/a
 
      08-03-2003
im trying to work throught the mags(finially) but the first one is giving me
code warrior's compiler is giving me the following errors/warnings,any help
please?


Error : undefined identifier 'DIK_OEM_102'
gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102,
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : undefined identifier 'DIK_PAUSE'
gs_keycodes.h line 114 gsKEY_PAUSE = DIK_PAUSE,
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : declaration syntax error
gs_scoretable.h line 23 const int gsSCORE_NAME_SIZE = 3;
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : declaration syntax error
gs_soundsystem.h line 24 class gsCSoundSystem : public gsCObject
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : declaration syntax error
gs_soundsystem.h line 25 {
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : declaration syntax error
gs_soundsystem.h line 26 private:
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : declaration syntax error
gs_soundsystem.h line 33 public:
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Warning : implicit 'int' is no longer supported in C++
gs_soundsystem.h line 34 gsCSoundSystem();
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : illegal function overloading
gs_soundsystem.h line 34 gsCSoundSystem();
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Warning : implicit 'int' is no longer supported in C++
gs_soundsystem.h line 35 gsCSoundSystem();
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : illegal function overloading
gs_soundsystem.h line 35 gsCSoundSystem();
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp

Error : '}' expected
demo1.cpp line 235 }
Project: demo1.mcp, Target: Windows C++ GUI Debug, Source File: demo1.cpp






 
Reply With Quote
 
 
 
 
John Harrison
Guest
Posts: n/a
 
      08-03-2003

"A.J.B 2.K.3" <> wrote in message
news:bgjigf$lp2$...
> im trying to work throught the mags(finially) but the first one is giving

me
> code warrior's compiler is giving me the following errors/warnings,any

help
> please?
>


[error messages snipped]

You are expecting help on error messages without quoting the source code
that is giving rise to the errors. Do you think we are psychic?

john


 
Reply With Quote
 
 
 
 
A.J.B 2.K.3
Guest
Posts: n/a
 
      08-04-2003
all i want to know is what they mean?
im trying to lean c++ but i cant work out what its try to say to me
"John Harrison" <> wrote in message
news:bgjln7$p6frg$...
>
> "A.J.B 2.K.3" <> wrote in message
> news:bgjigf$lp2$...
> > im trying to work throught the mags(finially) but the first one is

giving
> me
> > code warrior's compiler is giving me the following errors/warnings,any

> help
> > please?
> >

>
> [error messages snipped]
>
> You are expecting help on error messages without quoting the source code
> that is giving rise to the errors. Do you think we are psychic?
>
> john
>
>



 
Reply With Quote
 
A.J.B 2.K.3
Guest
Posts: n/a
 
      08-04-2003

"John Harrison" <> wrote in message
news:bgjln7$p6frg$...
> [error messages snipped]
>
> You are expecting help on error messages without quoting the source code
> that is giving rise to the errors. Do you think we are psychic?
>
> john

yo want the 4 for pages of code?
they wont fit here but here goes.

1)
Error : undefined identifier 'DIK_OEM_102'
gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102,

code= gsKEY_OEM_102 = DIK_OEM_102,

2)
Error : undefined identifier 'DIK_PAUSE'
gs_keycodes.h line 114 gsKEY_PAUSE = DIK_PAUSE,

code= gsKEY_PAUSE = DIK_PAUSE,
3)
Error : ';' expected
gs_scoretable.h line 23 const Int gsSCORE_NAME_SIZE=3;

code=
//-------------------------------------------------------------

const Int gsSCORE_NAME_SIZE=3;

//-------------------------------------------------------------


4)
Error : undefined identifier 'gsSCORE_NAME_SIZE'
gs_scoretable.h line 30 char m_name[gsSCORE_NAME_SIZE];

code=
//-------------------------------------------------------------

struct gsScoreItem
{
int m_score;
char m_name[gsSCORE_NAME_SIZE];
};

//-------------------------------------------------------------

5)
Error : ';' expected
gs_soundsystem.h line 24 Class gsCSoundSystem : public gsCObject
6)
Error : declaration syntax error
gs_soundsystem.h line 26 private:
7)
Error : declaration syntax error
gs_soundsystem.h line 33 public:

Warning : implicit 'int' is no longer supported in C++
gs_soundsystem.h line 34 gsCSoundSystem()
9)
Error : ';' expected
gs_soundsystem.h line 35 gsCSoundSystem();

code=
//-------------------------------------------------------------

Class gsCSoundSystem : public gsCObject

private:
bool m_active;
gsCList<gsCSample *> m_sample_list;
gsCList<gsCMusic *> m_music_list;

gsCMusic *m_current_music;

public:
gsCSoundSystem()
gsCSoundSystem();

bool create();
bool destroy();

bool isActive();

void clearMusicList();
bool addMusic(const char *filename);
int getNumberOfMusics();
bool playMusic(int index);
void stopMusic();
bool isMusicFinished();

void clearSampleList();
bool addSample(const char *filename);
int getNumberOfSamples();
bool playSample(int index,int panning = 0);
void stopSamples();

void setVolume(int music_percent,int sample_percent);
}

//------------------------------------------------------------

10)
Error : declaration syntax error
gs_sprite.h line 66 inline void gsCSprite::setActive(bool state)
code =

//-------------------------------------------------------------

inline void gsCSprite::setActive(bool state)
{
m_active = state;
}

//-------------------------------------------------------------
11)
Error : '}' expected
demo1.cpp line 235 }

//-------------------------------------------------------------
// Draw all the sprites on screen

void CDemo1::drawSprites()
{
for (int i = 0; i < m_sprite.getSize(); i++)
m_sprite[i]->draw();
}

//-------------------------------------------------------------
// Move all sprites

void CDemo1::moveSprites()
{
gsCRect screen_rect = m_screen.getRect();

// this basically moves each sprite up the screen

// if the sprite goes off the screen it's wrapped
// around to the bottom

for (int i = 0; i < m_sprite.getSize(); i++) {

m_sprite[i]->move(gsCPoint(0,-((i & 3) + 1)));

gsCRect sprite_rect = m_sprite[i]->getRect();

if (!(sprite_rect.overlaps(screen_rect)))
m_sprite[i]->move(gsCPoint(0,m_screen.getSize().getY() +
m_image.getSize().getY()));
}
}
}

//-------------------------------------------------------------
this looks bad cus i have lost the format but the source was givenaway on a
mag





 
Reply With Quote
 
John Harrison
Guest
Posts: n/a
 
      08-04-2003

"A.J.B 2.K.3" <> wrote in message
news:bgm3tv$nrb$...
> all i want to know is what they mean?
> im trying to lean c++ but i cant work out what its try to say to me


Unforunately compiler error messages often aren't very meaningful.
Especially after the first few errors compilers often get confused and start
reporting evrything as an error. You just have to get used to how you
compiler works.

Error : undefined identifier 'DIK_OEM_102'
gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102,

This is very simple, in C++ every name (or identifier) has to be defined
before it is used. The compiler is complaining that you are using the name
DIK_OEM_102 without having defined it first. This is happening in the file
gs_keycodes.h.

Something tells me that isn't a file that you wrote, so why would a file
that someone else wrote be giving you a compilation error. I can't really
answer that. I suspect that you are trying something too ambitious, without
genuinely understanding what you are doing, and just hoping that it will
work.

DIK_PAUSE is the same but the rest are impossible to say without seeing the
code. That means all the code, not just the line that error is on. Post the
code if you want more help, all the code. Sometimes when there is a lot of
code, people place it on a web site and post the link.

john


 
Reply With Quote
 
A.J.B 2.K.3
Guest
Posts: n/a
 
      08-04-2003
thanks ill opst the code page seperatly.
im usind Code warrior but the code was written using bcc and code warrior
doesn't like bcc's grammer.

"John Harrison" <> wrote in message
news:bgm5km$m3nre$...
>
> "A.J.B 2.K.3" <> wrote in message
> news:bgm3tv$nrb$...
> > all i want to know is what they mean?
> > im trying to lean c++ but i cant work out what its try to say to me

>
> Unforunately compiler error messages often aren't very meaningful.
> Especially after the first few errors compilers often get confused and

start
> reporting evrything as an error. You just have to get used to how you
> compiler works.
>
> Error : undefined identifier 'DIK_OEM_102'
> gs_keycodes.h line 106 gsKEY_OEM_102 = DIK_OEM_102,
>
> This is very simple, in C++ every name (or identifier) has to be defined
> before it is used. The compiler is complaining that you are using the name
> DIK_OEM_102 without having defined it first. This is happening in the file
> gs_keycodes.h.
>
> Something tells me that isn't a file that you wrote, so why would a file
> that someone else wrote be giving you a compilation error. I can't really
> answer that. I suspect that you are trying something too ambitious,

without
> genuinely understanding what you are doing, and just hoping that it will
> work.
>
> DIK_PAUSE is the same but the rest are impossible to say without seeing

the
> code. That means all the code, not just the line that error is on. Post

the
> code if you want more help, all the code. Sometimes when there is a lot of
> code, people place it on a web site and post the link.
>
> john
>
>



 
Reply With Quote
 
A.J.B 2.K.3
Guest
Posts: n/a
 
      08-04-2003
//-------------------------------------------------------------
//
// Class: gsCKeyboard - keyboard codes
//
// Author: John M Phillips
//
// Started: 12/03/00
//
// Base: gsCInput
//
// Derived: None
//
//-------------------------------------------------------------

#ifndef _INCLUDE_GS_KEYCODES_H
#define _INCLUDE_GS_KEYCODES_H

//-------------------------------------------------------------
// Key Codes

typedef enum {
gsKEY_NONE = 0,
gsKEY_ESCAPE = DIK_ESCAPE,
gsKEY_1 = DIK_1,
gsKEY_2 = DIK_2,
gsKEY_3 = DIK_3,
gsKEY_4 = DIK_4,
gsKEY_5 = DIK_5,
gsKEY_6 = DIK_6,
gsKEY_7 = DIK_7,
gsKEY_8 = DIK_8,
gsKEY_9 = DIK_9,
gsKEY_0 = DIK_0,
gsKEY_MINUS = DIK_MINUS,
gsKEY_EQUALS = DIK_EQUALS,
gsKEY_BACK = DIK_BACK,
gsKEY_TAB = DIK_TAB,
gsKEY_Q = DIK_Q,
gsKEY_W = DIK_W,
gsKEY_E = DIK_E,
gsKEY_R = DIK_R,
gsKEY_T = DIK_T,
gsKEY_Y = DIK_Y,
gsKEY_U = DIK_U,
gsKEY_I = DIK_I,
gsKEY_O = DIK_O,
gsKEY_P = DIK_P,
gsKEY_LBRACKET = DIK_LBRACKET,
gsKEY_RBRACKET = DIK_RBRACKET,
gsKEY_RETURN = DIK_RETURN,
gsKEY_LCONTROL = DIK_LCONTROL,
gsKEY_A = DIK_A,
gsKEY_S = DIK_S,
gsKEY_D = DIK_D,
gsKEY_F = DIK_F,
gsKEY_G = DIK_G,
gsKEY_H = DIK_H,
gsKEY_J = DIK_J,
gsKEY_K = DIK_K,
gsKEY_L = DIK_L,
gsKEY_SEMICOLON = DIK_SEMICOLON,
gsKEY_APOSTROPHE = DIK_APOSTROPHE,
gsKEY_GRAVE = DIK_GRAVE,
gsKEY_LSHIFT = DIK_LSHIFT,
gsKEY_BACKLASH = DIK_BACKSLASH,
gsKEY_Z = DIK_Z,
gsKEY_X = DIK_X,
gsKEY_C = DIK_C,
gsKEY_V = DIK_V,
gsKEY_B = DIK_B,
gsKEY_N = DIK_N,
gsKEY_M = DIK_M,
gsKEY_COMMA = DIK_COMMA,
gsKEY_PERIOD = DIK_PERIOD,
gsKEY_SLASH = DIK_SLASH,
gsKEY_RSHIFT = DIK_RSHIFT,
gsKEY_MULTIPLY = DIK_MULTIPLY,
gsKEY_ALT = DIK_LMENU,
gsKEY_SPACE = DIK_SPACE,
gsKEY_CAPITAL = DIK_CAPITAL,
gsKEY_F1 = DIK_F1,
gsKEY_F2 = DIK_F2,
gsKEY_F3 = DIK_F3,
gsKEY_F4 = DIK_F4,
gsKEY_F5 = DIK_F5,
gsKEY_F6 = DIK_F6,
gsKEY_F7 = DIK_F7,
gsKEY_F8 = DIK_F8,
gsKEY_F9 = DIK_F9,
gsKEY_F10 = DIK_F10,
gsKEY_NUMLOCK = DIK_NUMLOCK,
gsKEY_SCROLL = DIK_SCROLL,
gsKEY_NUMPAD7 = DIK_NUMPAD7,
gsKEY_NUMPAD8 = DIK_NUMPAD8,
gsKEY_NUMPAD9 = DIK_NUMPAD9,
gsKEY_SUBTRACT = DIK_SUBTRACT,
gsKEY_NUMPAD4 = DIK_NUMPAD4,
gsKEY_NUMPAD5 = DIK_NUMPAD5,
gsKEY_NUMPAD6 = DIK_NUMPAD6,
gsKEY_ADD = DIK_ADD,
gsKEY_NUMPAD1 = DIK_NUMPAD1,
gsKEY_NUMPAD2 = DIK_NUMPAD2,
gsKEY_NUMPAD3 = DIK_NUMPAD3,
gsKEY_NUMPAD0 = DIK_NUMPAD0,
gsKEY_DECIMAL = DIK_DECIMAL,
gsKEY_OEM_102 = DIK_OEM_102,
gsKEY_F11 = DIK_F11,
gsKEY_F12 = DIK_F12,
gsKEY_ENTER = DIK_NUMPADENTER,
gsKEY_RCONTROL = DIK_RCONTROL,
gsKEY_DIVIDE = DIK_DIVIDE,
gsKEY_SYSRQ = DIK_SYSRQ,
gsKEY_RIGHTALT = DIK_RMENU,
gsKEY_PAUSE = DIK_PAUSE,
gsKEY_HOME = DIK_HOME,
gsKEY_UP = DIK_UP,
gsKEY_PAGEUP = DIK_PRIOR,
gsKEY_LEFT = DIK_LEFT,
gsKEY_RIGHT = DIK_RIGHT,
gsKEY_END = DIK_END,
gsKEY_DOWN = DIK_DOWN,
gsKEY_PAGEDOWN = DIK_NEXT,
gsKEY_INSERT = DIK_INSERT,
gsKEY_DELETE = DIK_DELETE,
} gsKeyCode;

//-------------------------------------------------------------

#endif




 
Reply With Quote
 
A.J.B 2.K.3
Guest
Posts: n/a
 
      08-04-2003

"John Harrison" <> wrote in message
news:bgm5km$m3nre$...

> Something tells me that isn't a file that you wrote, so why would a file
> that someone else wrote be giving you a compilation error. I can't really
> answer that. I suspect that you are trying something too ambitious,

without
> genuinely understanding what you are doing, and just hoping that it will
> work.
>
> john

im trying to follow a tut posted in the mag with the source.


 
Reply With Quote
 
John Harrison
Guest
Posts: n/a
 
      08-04-2003

"A.J.B 2.K.3" <> wrote in message
news:bgm7q8$ftu$...
>
> "John Harrison" <> wrote in message
> news:bgm5km$m3nre$...
>
> > Something tells me that isn't a file that you wrote, so why would a file
> > that someone else wrote be giving you a compilation error. I can't

really
> > answer that. I suspect that you are trying something too ambitious,

> without
> > genuinely understanding what you are doing, and just hoping that it will
> > work.
> >
> > john

> im trying to follow a tut posted in the mag with the source.
>


Yes but is it a tutorial for your compiler? Different compilers accept
different code and some tutorials don't make it clear which compiler they
are written for.

A good tutorial in the C++ language would be accepted by any compiler but a
bad one wouldn't. My guess is that you are following a graphics tutorial,
and since standard C++ has no graphics at all, every graphics tutorial is
going to be specific to one particular compiler or platform. There is no
guarantee that it will work on another compiler or platform.

You need to learn what is standard C++ and what is not. I would suggest you
find a tutorial in standard C++ before you start to learn other stuff like
graphics.

john



 
Reply With Quote
 
John Harrison
Guest
Posts: n/a
 
      08-04-2003

"A.J.B 2.K.3" <> wrote in message
news:bgm7f1$p6$...
> thanks ill opst the code page seperatly.
> im usind Code warrior but the code was written using bcc and code warrior
> doesn't like bcc's grammer.


I doubt it's the grammar, it's probably 3rd party libraries which are
supported by one compiler but not the other.

john


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PCF Mode Vince Wireless Networking 1 12-07-2005 10:20 PM
Do the client cards support PCF sharkie Wireless Networking 0 11-14-2004 01:01 PM
Re: Xenon 2 Kleeb Computer Security 2 08-09-2004 08:46 AM
Xenon 2000: Project PCF Christian Drewing C++ 8 09-08-2003 07:24 PM
How to deal with Windows .FON or .PCF fonts in java? Duong Pham Java 0 07-01-2003 06:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57