(C++) 'Container::value\_type' is not a type
January 10, 2018 · View on GitHub
Full error message
/MyFolder/main.cpp:4: error: 'Container::value_type' is not a type /MyFolder/main.cpp:4: error: expected initializer before 'MinElement'
Cause
IDE: Qt Creator 1.3.1
Project type: Qt4 Console Application
Selected required modules: QtCore
Boost version: 1.42.0
The following code caused the error:
template <class Container> const Container::value_type::value_type MinElement(const Container& v) { }
The following project file was used:
#------------------------------------------------- # # Project created by QtCreator 2010-05-02T08:31:54 # #------------------------------------------------- QT -= gui TARGET = MyProjectName peglib += console peglib -= app_bundle INCLUDEPATH += ../../../boost_1_42_0 TEMPLATE = app SOURCES += main.cpp
Solution
Unknown. Feel encouraged to contact me if you know the solution.