여기서 잘못된 것은 무엇입니까?헤더 파일에 선언 된 네임 스페이스가 소스 파일에서 인식되지 않습니다.
APP_H,
#pragma once
namespace App{
enum class AppStatus{
Exit,
Menu,
Run
};
void frameLoop();
AppStatus state;
}
App.cpp
#include "App.h"
#include "stdafx.h"
#include <Graphic\Graphic.h>
void App::frameLoop()
{
while (state != AppStatus::Exit) {
Graphic::renderingSequence();
}
}
오류
Error C2653 'App': is not a class or namespace name App
Error C2065 'state': undeclared identifier App
Error C2653 'AppStatus': is not a class or namespace name App
Error C2065 'Exit': undeclared identifier App
주 내 네임 스페이스그(\ Graphic \ Graphic.h에 선언되어 있음)은 컴파일러가 인식하고 있습니다.
'사용법 #include "stdafx.h를은"'항상 첫 번째 비 주석 행이어야합니다. 그 위의 모든 행은 컴파일러에서 무시됩니다. – drescherjm
이것은 중복되어야합니다. – drescherjm
감사! '#include' –
stimulate