當前位置:妙知谷 >

遊戲數碼 >電腦 >

include stdafx.h 無法打開源文件怎麼辦

include stdafx.h 無法打開源文件怎麼辦

我們編程的時候會用到許許多多的頭文件,那麼當系統提示
include stdafx.h頭文件錯誤,無法打開的時候怎麼辦呢?別急,看過來,小編帶你解決問題帶你飛。

操作方法

(01)為了更加簡潔的説明,小編用來cfree5來講解説明。首先,看下include stdafx.h文件報錯。

include stdafx.h 無法打開源文件怎麼辦

(02)接着我們找到cfree5的快捷方式,然後鼠標單擊右鍵,打開文件位置。

include stdafx.h 無法打開源文件怎麼辦 第2張

(03)在cfree文件夾裏面找到“mingw”這個子文件夾。

include stdafx.h 無法打開源文件怎麼辦 第3張

(04)然後找到“include ”這個文件夾,這個是存放頭文件的文件夾。

include stdafx.h 無法打開源文件怎麼辦 第4張

(05)可以看到這裏並沒有stdafx.h這個頭文件,這就是編程報錯的原因。

include stdafx.h 無法打開源文件怎麼辦 第5張

(06)知道錯誤原因就很好解決了,網上下載一個stdafx.h頭文件就可以了。

include stdafx.h 無法打開源文件怎麼辦 第6張

(07)把stdafx.h頭文件放到對應的文件夾裏面就可以了。

include stdafx.h 無法打開源文件怎麼辦 第7張

(08)如圖所示,完美解決了報錯的問題,是不是很簡單很神奇呢?

include stdafx.h 無法打開源文件怎麼辦 第8張
  • 文章版權屬於文章作者所有,轉載請註明 https://miaozhigu.com/sm/diannao/9zo0md.html