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();
};
}
#endif
and my Menu.cpp:
#include "stdio.h"
using namespace std;
namespace View
{
void Menu::startMenu()
{
cout << "This is a menu";
}
}