I'm studying C++ with this book which has this header file. When I try to run a simple "Hello, world!" program the compiler complains and give me this output. I'm using latest macOS. Could somebody please help me?
[Running] cd "/Users/Ramsan/Praxis/" && g++ yup.cpp -o yup && "/Users/Ramsan/Praxis/"yup
In file included from yup.cpp:1:
/Users/Ramsan/std_lib_facilities.h:71:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using size_type = typename std::vector<T>::size_type;
^
/Users/Ramsan/std_lib_facilities.h:101:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using size_type = std::string::size_type;
^
/Users/Ramsan/std_lib_facilities.h:218:73: error: expected '(' for function-style cast or type construction
inline int randint(int min, int max) { return uniform_int_distribution<>{min, max}(get_rand()); }
~~~~~~~~~~~~~~~~~~~~~~~~~~^
/Users/Ramsan/std_lib_facilities.h:227:20: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using Value_type = typename C::value_type;
^
/Users/Ramsan/std_lib_facilities.h:230:18: warning: alias declarations are a C++11 extension [-Wc++11-extensions]
using Iterator = typename C::iterator;
^
4 warnings and 1 error generated.
[Done] exited with code=1 in 0.795 seconds
Aucun commentaire:
Enregistrer un commentaire