Hi!
I have big problems with header files. I get compiler errors that GotoXY function is already
defined in file main.obj.
I have a header file in the directory <CGE SDK 1.0/cge.h> (CGE SDK 1.0 is the directory under include directory in VC++ .NET).
It look like this (cge.h):
I call this header file in other file, which name is main.h like this:Code:# ifndef CGE_H # define CGE_H # include <windows.h> # include <stdio.h> # include <string.h> # include <io.h> # include <time.h> # include <assert.h> # include "colors.h" # include "dialogbox.h" # include "advedit.h" // ASCII graphical elements for drawing a frame # define RIGHT_DOWN_LINE 218 # define RIGHT_DOWN_DOUBLELINE 201 # define RIGHT_UP_LINE 192 # define RIGHT_UP_DOUBLELINE 200 // function prototypes void GotoXY (short x, short y); void ClrScr (short x, short y, short EraseLength, short NoOfLines, WORD EraseColor, char ErasePattern); BOOL SetColor (WORD Color); # endif CGE_H
In the main.c file I have this:Code:# ifndef MAIN_H # define MAIN_H # include <CGE SDK 1.0/cge.h> // background color for the main menu # define MAIN_MENU_COLOR BACK_DARKTURQUIOSE // setup file # define OPTIONS_FILE "./options.ini" void SnakeLogo (void); # endif MAIN_H
Where is the problem?Code:# include "main.h" . . . int main () { GotoXY (10, 10); printf ("HELLO !"); return 0; }
Please help.



LinkBack URL
About LinkBacks


