How to fix error: unknown type name ‘namespace’

前端 未结 3 1390
暖寄归人
暖寄归人 2021-01-04 14:05
#ifndef UNO_ACTION_ 
#define UNO_ACTION_
namespace Uno
{
namespace Game
{
    class Game;
}
} // namespace

namespace Uno
{
namespace Action
{
using ::Uno::Game::Gam         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 14:33

    I had a similar issue and found this question but the solutions don't match mine completely, so I'm adding mine here.

    In my case, I was including a header file in .cpp files and .c files. The solution was to split off the namespace part of the header since that was obviously only needed in the .cpp files.

提交回复
热议问题