最新消息: 电脑我帮您提供丰富的电脑知识,编程学习,软件下载,win7系统下载。

我如何在NodeJ中运行C ++?

IT培训 admin 17浏览 0评论

我如何在NodeJ中运行C ++?

我如何运行C ++代码以在NodeJ中添加两个数字?

在C ++中加两个数字的代码:

       #include <iostream>
       using namespace std;
       int main()
       {
       int num1, num2, result;
       num1 = 1;
       num2 = 1;
       result = num1 + num2; 
       cout << result << endl;
       return 0;
       }
回答如下:

node-addon-api中有很多示例。这是一个用C ++计算Pi并将结果传回Node.js的方法]

https://github/nodejs/node-addon-examples/tree/master/async_pi_estimate/node-addon-api

我如何在NodeJ中运行C ++?

我如何运行C ++代码以在NodeJ中添加两个数字?

在C ++中加两个数字的代码:

       #include <iostream>
       using namespace std;
       int main()
       {
       int num1, num2, result;
       num1 = 1;
       num2 = 1;
       result = num1 + num2; 
       cout << result << endl;
       return 0;
       }
回答如下:

node-addon-api中有很多示例。这是一个用C ++计算Pi并将结果传回Node.js的方法]

https://github/nodejs/node-addon-examples/tree/master/async_pi_estimate/node-addon-api

11136
发布评论

评论列表 (0)

  1. 暂无评论