合并HTML和C++:实现HTML与C++的结合
P粉642919823
P粉642919823 2023-09-02 17:11:20
[HTML讨论组]
<p>我对html和c++都很陌生,但在c#方面有很多知识。我刚刚编写了自己的第一个100%的c++程序,一个小型银行系统,并且需要一点帮助来将html集成进去。 例如,如何在html中显示资金?</p> <p>IDE Clion。</p> <pre class="brush:php;toolbar:false;">int press; int newFunds; cout &lt;&lt; &quot;可用资金 &quot;; cout &lt;&lt; funds; cout &lt;&lt; &quot;$ \n&quot;; cout &lt;&lt; &quot;按1提款 \n&quot;; cout &lt;&lt; &quot;按2存款 \n&quot;; cin &gt;&gt; press; if(press == 1) { cout &lt;&lt; &quot;金额&quot;; cin &gt;&gt; withdraw; funds -= withdraw; newFunds += withdraw; if(funds &lt; 0) { funds += newFunds; cout &lt;&lt; &quot;资金不足!&quot;; } else { cout &lt;&lt; &quot;剩余资金 &quot;, cout &lt;&lt; funds, cout &lt;&lt; &quot;$ \n&quot;; } } else if(press == 2) { cout &lt;&lt; &quot;金额\n&quot;; cin &gt;&gt; deposit; funds += deposit; cout &lt;&lt; &quot;资金 &quot;; cout &lt;&lt; funds; cout &lt;&lt; &quot;$&quot;; } if(press &gt; 2) { cout &lt;&lt; &quot;无效&quot;; } return 0; }</pre> <p>我欢迎任何建议!</p> <p>我尝试查找一些教程,但它们并不是很好!</p>
P粉642919823
P粉642919823

全部回复(1)
P粉359850827

C++和HTML不能仅通过创建本地主机Web服务器来连接。要在它们之间建立“连接”,您需要一个C++ API来与服务器和您的C++程序进行交互。FastCGI协议对于初学者来说简单易用,但可能不是更专业项目的最佳选择。查看关于FastCGI++的信息,它是一个用于C++的API。这是一个我推荐开始的有用的GitHub链接:https://github.com/eddic/fastcgipp

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号