Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) 'Container::value_type' is not a type

 

Compile error.

 

 

 

 

 

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

Compiler: G++ 4.4.1

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.

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict