I am studying from Bjarne Stroustrup's book "Programming - Principles and Practice using C++". In his book he asked to include "std_lib_facilities.h". So I got part of code like this
#ifndef H112
#define H112 020215L
#include<iostream>
#include<iomanip>
#include<fstream>
#include<sstream>
#include<cmath>
#include<cstdlib>
#include<string>
#include<list>
#include <forward_list>
#include<vector>
#include<unordered_map>
#include<algorithm>
#include <array>
#include <regex>
#include<random>
#include<stdexcept>
//------------------------------------------------------------------------------
#if __GNUC__ && __GNUC__ < 5
inline ios_base & defaultfloat(ios_base& b) // to augment fixed and scientific as in C++11
{
b.setf(ios_base::fmtflags(0), ios_base::floatfield);
return b;
}
#endif
Xcode won't compile my project and show me error
unknown type name in this part
Unknown type name 'ios_base'; did you mean 'std::ios_base'? Replace 'ios_base' with 'std::ios_base'
at
inline ios_base & defaultfloat(ios_base& b)
and also show me error
Use of undeclared identifier 'ios_base'; did you mean 'std::ios_base'?
at
b.setf(ios_base::fmtflags(0), ios_base::floatfield);
so I changed all ios_base to std::ios_base but it won't compile my project still....