Saturday, 24 August 2013

Error when using namespaces - class not declared

Error when using namespaces - class not declared

I'm new to C++ and using namespaces and I can't see what I'm doing wrong
here. When I compile the code below, I get the error:
error: 'Menu' has not been declared
Here is my header file Menu.hpp
#ifndef MENU_H //"Header guard"
#define MENU_H
namespace View
{
class Menu
{
void startMenu();
};
}

No comments:

Post a Comment