BYTE as undeclared identifier even though I have included windows.h

后端 未结 1 536
北海茫月
北海茫月 2020-12-22 04:21

My code is as follows

// ConsoleApplication1.cpp : Defines the entry point for the console application.
//
#include 
#include \"stdafx.h\"

         


        
相关标签:
1条回答
  • 2020-12-22 05:12

    You have #include "stdafx.h", which usually means that you're using a precompiled header. If you use a precompiled header, anything preceding the precompiled header will be discarded.

    Try reordering your #include lines so that "stdafx.h" is first. (Or change stdafx.h to #include <windows.h>, which is generally where you want to put commonly-used system headers.)

    0 讨论(0)
提交回复
热议问题