2016-06-28 137 views
-1

所以我按照這個頁面中的另一個問題的答案,關於如何安裝graphics.h的說明,並且它導致了正確。但是當我收錄它時,它向我顯示了這個錯誤信息:graphics.h - 安裝它,爲什麼仍然錯誤?

C:\Program Files\CodeBlocks\MinGW\include\graphics.h|302|error: redefinition of 'int right'| 
C:\Program Files\CodeBlocks\MinGW\include\graphics.h|302|note: 'int right' previously declared here| 

爲什麼發生這種情況?你能幫我解決這個問題嗎?

這是我從信息: How to use graphics.h in codeblocks?

+0

請您分享一下您已經聲明變量「正確」的代碼嗎? –

+0

錯誤在庫內陳述 – AlbanianGamerYT

+0

我的代碼只是在屏幕上打印「圖形」。我只是測試了一下。 – AlbanianGamerYT

回答

1

您是否遵循了link提供的最後一項決議已指定?

  1. 使用Sublime Text Editor或Notepad ++從包含已安裝Codeblock的包含文件夾中打開文件graphics.h。
  2. 轉到第302行
  3. 刪除該行並在該行中粘貼int left = 0,int top = 0,int right = INT_MAX,int bottom = INT_MAX。
  4. 保存文件並開始編碼。
+0

謝謝!重寫該行解決了問題。再一次感謝你! – AlbanianGamerYT

相關問題