iT邦幫忙

0

int main (void)在Dev-C++5.11顯示為語法錯誤

01#include<stdio.h>
02#include<stdlib.h>
03int main (void)
04{
05 char ch=90;
06 printf("ch=%c\n",ch);
07
08 system("pause");
09 return 0;
10}


03 編譯執行完後,結果顯示我語法錯誤(syntax error),
我是參考c語言教學手冊(3-10)這本書,軟體使用Dev-C++5.11。
請問為甚麼語法會顯示錯誤呢?該如何改?
還有Dev-C++5.11是C和C++都能使用嗎?
感謝

圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 個回答

2
海綿寶寶
iT邦大神 1 級 ‧ 2021-12-05 07:25:41
最佳解答

參考這篇

注意:在這個步驟時要選C 專案而不是C++ 專案

abcit iT邦新手 5 級 ‧ 2021-12-05 07:47:06 檢舉

感謝您,我來試試。

我要發表回答

立即登入回答