Jump to content
  • Advertisement
Sign in to follow this  
janjanjan

Class stays blind

This topic is 3049 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey!

I´m currently working on a Load/Save Routine and got it working quite fine already..
here is a part of the code:

IO.h

#ifndef _IO_H_
#define _IO_H_

#include "globals.h"
#include "Writer.h"

class IO
{
public:
IO(string filename);
string iofile;

bool SaveWriter(Writer &refData);
bool LoadWriter(Writer &refData);


};
#endif




Writer.h

#ifndef _WRITER_H_
#define _WRITER_H_

#include "globals.h"
#include "IO.h"
#include "Dialog.h"

class Writer
{
public:
Writer();

{...}
};

#endif




when compiling i get

... IO.h(12): error C2061: syntax error : identifier 'Writer'


what did i do wrong... the longer i program in cpp the less i know how to do what ^^ -.-


thanks for yout time and help,
jan

Share this post


Link to post
Share on other sites
Advertisement
looks like your files are getting confused as they are tryinging to link to each other. Try removing

#include "Writer.h"

and replace it with

class Writer;

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!