Как скомпилировать последние примеры статьи Stroustrup? [дублировать]C++

Программы на C++. Форум разработчиков
Anonymous
Как скомпилировать последние примеры статьи Stroustrup? [дублировать]

Сообщение Anonymous »

Как составить примеры из последней статьи ACM Stroustrup?

Код: Выделить всё

g++ (MacPorts gcc14 14.2.0_3+stdlib_flag) 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
< /code>
Попытка составить это: < /p>
import std;                  // make all of the standard library available
using namespace std;

int main()                   // print unique lines from input

{        unordered_map m;  // hash table
for (string line; getline (cin,line); )
if (m[line]++ == 0)
cout

Подробнее здесь: [url]https://stackoverflow.com/questions/79446955/how-to-compile-stroustrups-latest-acm-article-examples[/url]

Вернуться в «C++»