I am creating a text adventure game. Although I've written several of these (in c++ of course), I am upgrading my libraries to handle Object-Oriented Programming.
Here is some code that is causing me annoyance (it's just the header file):
1 2 3 4 5 6 7 8 9
#pragma once
#include <string>
class room
{
//...(more code here)
*room northLocation();
//...(more functions like this, all causing errors)
};
For some freakishly obnoxious reason, my IDE, Visual C++ 2010 Express, is generating these errors before I've even compiled the dang thing:
Error: this declaration has no storage class or type specifier
Error: declaration of a member with the same name as its class
I think that the IDE and compiler think that I am trying to create an int data type called *room::room because of the complaint readout from Visual C++, but I can't imagine what could be causing this...
There is at least one member of these forums that will get the urge to eat you alive when he reads this.
This might be worth reading -> http://cplusplus.com/forum/articles/28558/