I am trying to use size_type from std :: list, and I have the following list:
std::list<T*> mylist; template <class T> T* at(std::list<T*>::size_type pos);
But this does not work as I get a bunch of syntax errors.
template <class T> T* at(typename std::list<T*>::size_type pos); // ^^^^^^^^
See also this question .
Add typenameala:
typename
template <class T> T* at(typename std::list<T*>::size_type pos);
Otherwise, the compiler does not know what size_type is.
Source: https://habr.com/ru/post/1795161/More articles:How to mount a Tomcat application with context link with mod_jk? - tomcatAndroid sync adapter - androidHow to hide application context in its url using Tomcat? - tomcatSaving files using Carrierwave without forms - ruby-on-railsHTML javascript normalizer - javaHow to vote using Rails 3 gem 'thumbs_up'? - ruby-on-railsSaving and loading UIImage from / to string - objective-cimport and export of all categories in csv format - importNumber of lines using C - cPHP excluding numbers from rand () function - phpAll Articles