I recently attempted to include prototypes of some of my files into my header file, but on "make", I recieved the following:
Code:
[georig1\ 18:52:50\ george\ ~/cfiles/George Lair/050606]$ make
g++ -c `sdl-config --cflags` main.cpp
In file included from main.cpp:9:
headerfiles.h:44: error: expected constructor, destructor, or type conversion before '*' token
headerfiles.h:44: error: expected `,' or `;' before '*' token
headerfiles.h:45: error: variable or field `WrightIn' declared void
headerfiles.h:45: error: `string' was not declared in this scope
make: *** [main.o] Error 1
[georig1\ 18:56:06\ george\ ~/cfiles/George Lair/050606]$
I googled string and makefile(s) and different phrasings of my problem, then just Makefiles and read a couple makefile tutorials, but so far I haven't come across anything showing that I can or can't have prototypes of string functions. So my question is, how do I have my string functions play nicely with my headerfile?
Here is the actual file:
Code:
#ifndef HEADERFILES_H
#define HEADERFILES_H
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <SDL/SDL.h>
#include "SDL_ttf.h"
#include <time.h>
#include <fstream>
#include <string>
void FightChk();
void display_bmp(char *file_name, int x2, int y2);
void display_font(int x2, int y2, int Psize, int R, int G, int B);
void move_xy(bool x, bool y);
string * ReadOut(void); // This operates in conjunction with ReadFilesLines()
void WrightIn(string STRING); // This operates alone.
void ReadFileLines(void); // This operates in conjuction with ReadOut()
extern SDL_Surface *text_surface, *image, *screen;;
extern bool done;
extern SDL_Rect dest;
using namespace std;
#endif