c++ - (Software issue) Can anyone suggest a download that will definitely bring my Mingw32 compiler up to speed? -
#include <iostream> #include <string> using namespace std; int main(){ string s = "wassup", newval = "though"; cout << *(s.insert(s.begin(), newval.begin(), newval.end())); } this brings problem return type of string's insert member function void (error: void value not ignored ought be). this link indicates c++98 returns void "new" standard c++11 indeed return iterator.
a bit of context, faced problem earlier. was/am using codeblocks (gcc compiler collection) on windows 7 64-bit , program gave same issue (dereferencing void):
#include <iostream> #include <list> int main(){ list<int> x = {1,2,3,4}; *(x.insert(++x.begin(), 3, 2)); for(auto c : x) cout << c; } i posted issue on different forum , user pointed out mingw32 missing particular c++11 change, indicating mingw-w64 not have issue. went straight installing mingw-w64 on code::blocks using this guide , problem resolved. it's i've found out overloaded function takes 3 iterator parameters still returns void.
i'm little confused why code::blocks mingw32 didn't supply updated c++11 standard. can suggest download bring compiler speed?
Comments
Post a Comment