[Solved] Why cant I use c++ syntax on Node.JS terminal?


Just because a program is written in C++, doesn’t mean it can interpret C++ code. Would you expect this program to understand C++ code when you run it?

#include <iostream>

int main()
{
    std::string line;
    while (std::getline(std::cin, line)) {
        std::cout << line << '\n';
    }
}

0

solved Why cant I use c++ syntax on Node.JS terminal?