include stdafx.h 無法開啟原始檔怎麼辦

來源:酷知科普網 1.68W

我們程式設計的時候會用到許許多多的頭檔案,那麼當系統提示
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張
熱門標籤