-
Senior Member
registered user
g++ and deprecated iostream???
OK, I used to use and teach g++ a lot. In the last 2 years or so, I've switched to java. So, I guess I'm out of the loop when is comes to any g++ standards changes now a days. KNOPPIX has GNU GCC which includes g++ and using this I can write/compile/execute a standard helloworld.cc like:
Code:
//helloworld.cc MrG 2005.0609
//compile: g++ -o helloworld helloworld.cc
#include <iostream>
#include <string>
using namespace std;
int main()
{
string n;
cout << "What's your name? ";
cin >> n;
cout << "Hi, " << n << ", how about a nice game of chess?" << endl;
return 0;
}
However, on some distros lately I find that neither this program, nor anything else based on iostream, will compile correctly! Case in point, BCCD. Now, the author of that distro says that iostream and a number of other classes are depreicated but he still included all the *.h files in /include/c++/backward. So, I tried g++ -o helloworld helloword.cc -I/include/c++/backward to no avail. I also tried #include "/include/c++/backward/iostream.h" wothout any joy.
Anyone out there familiar with this problem know how to get around it?
TIA,
AJG
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Lenovo ThinkStation P520 Intel Xeon W-2123 3.6GHz 900W - NO RAM/ GPU/ HDD/ OS
$189.98

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD
$275.00

Intel Xeon E5-2697 V2 LGA2011 Server CPU Processor 2.7GHz 12 Core SR19H 130W
$35.00

Dell PowerEdge R420 Rack Server Intel Xeon 1.90GHz Six-Core 8GB DDR3 RAM
$95.00

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS
$84.49

Intel Xeon W-2255 SRGV8 3.7GHz 10-Core LGA2066 Server CPU Processor
$199.99

Dell Precision T5820 950W Workstation 4.00GHz W-2125 No RAM/ GPU/ HDD/ OS
$144.98

Intel Xeon E5-2698 V4 20CORE 2.2GHz 50M Processor SR2JW *km
$38.99

DELL Precision T3420 | Xeon 1240v6 | 525GB SSD |16GB RAM |Nvidia GPU |Win11
$149.00

Dell PowerEdge R410 Rack Server Dual Intel Xeon 2.53GHz Quadcore 6GB DDR3 RAM
$95.00