C++ shell - 在线 C++ 编译器

本文介绍了C++Shellv2,一个基于Emscripten的免费在线编译器,用于将C++代码转换为可在现代浏览器中运行的WebAssembly。它演示了一个简单的C++程序示例,并讨论了可能受限的系统调用。
摘要由CSDN通过智能技术生成

1. C++ shell

C++ Shell v2
https://cpp.sh/
https://cpp.sh/about.html

C++ Shell v2, free online compiler, proudly uses emscripten to compile your code.

emscripten is a clang-based compiler toochain that produces WebAssembly code, which can run directly in most modern browsers.

Using cpp.sh, your code is compiled on the server, and its wasm-code equivalent is produced. This code is then safely run locally in a Web Worker on your own browser.

Please, note that due to the limitations of the target platform, certain system calls may fail.

在这里插入图片描述

2. Example program

// Example program
#include <iostream>
#include <string>

int main()
{
  std::string name;
  std::cout << "What is your name? ";
  getline (std::cin, name);
  std::cout << "Hello, " << name << "!\n";
}

3. Options

在这里插入图片描述

4. Execution

​​​
在这里插入图片描述

References

[1] Yongqiang Cheng, https://yongqiang.blog.csdn.net/
[2] C++ shell, https://cpp.sh/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Yongqiang Cheng

梦想不是浮躁,而是沉淀和积累。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值