合併HTML與C++:實作HTML與C++的結合
P粉642919823
P粉642919823 2023-09-02 17:11:20
0
1
647
<p>我對html和c 都很陌生,但在c#方面有很多知識。我剛剛編寫了自己的第一個100%的c 程序,一個小型銀行系統,並且需要一點幫助來將html整合進去。 例如,如何在html中顯示資金? </p> <p>IDE Clion。 </p> <pre class="brush:php;toolbar:false;">int press; int newFunds; cout << "可用資金 "; cout << funds; cout << "$ \n"; cout << "按1提款 \n"; cout << "按2存款 \n"; cin >> press; if(press == 1) { cout << "金額"; cin >> withdraw; funds -= withdraw; newFunds = withdraw; if(funds < 0) { funds = newFunds; cout << "不足! "; } else { cout << "剩餘資金 ", cout << funds, cout << "$ \n"; } } else if(press == 2) { cout << "金額\n"; cin >> deposit; funds = deposit; cout << "資金 "; cout << funds; cout << "$"; } if(press > 2) { cout << "無效"; } return 0; }</pre> <p>我歡迎任何建議! </p> <p>我嘗試尋找一些教程,但它們並不是很好! </p>
P粉642919823
P粉642919823

全部回覆(1)
P粉359850827

C 和HTML不能只透過建立本機主機網路伺服器來連線。要在它們之間建立“連接”,您需要一個C API來與伺服器和您的C 程式進行互動。 FastCGI協定對於初學者來說簡單易用,但可能不是更專業專案的最佳選擇。查看關於FastCGI 的信息,它是一個用於C 的API。這是一個我推薦開始的有用的GitHub連結:https://github.com/eddic/fastcgipp

熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!