visual studio 2008 - Using `auto` yields error C4430: missing type specifier - int assumed. Note: C++ does not support default-int -


i use vs2008 on windows 10. have problem function , hope can me

void cpythonnetworkstream::appearshopsign(dword dwvid, std::string stsign) {     if (stsign.empty())         (auto = m_mapshopsign.begin(); != m_mapshopsign.end(); ++it)             if (dwvid == it->first)                 stsign = it->second;      // logboxf("appearshopsign: %u-%s", dwvid, stsign.c_str());     pycallclassmemberfunc(m_apophasewnd[phase_window_game], "binary_privateshop_appear", py_buildvalue("(is)", dwvid, stsign.c_str())); } 

error messages

error c4430: missing type specifier - int assumed. note: c++ not support default-int    error c2440: 'initializing' : cannot convert 'std::_tree<_traits>::iterator' 'int'  error c2678: binary '!=' : no operator found takes left-hand operand of type 'int' (or there no acceptable conversion) error c2227: left of '->first' must point class/struct/union/generic type 

the auto keyword supported since c++11 standard, isn't available visual-studio 2008.

to fix use explicit type:

for (std::map<dword,std::string>::iterator = m_mapshopsign.begin();    // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^      != m_mapshopsign.end();       ++it) 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -