DEV Community

sydney
sydney

Posted on

vector code not compiling

I have this vector project that I made from some sites that contain example code using vectors. None of these
examples compile. Then, out of the blue, I got a header file that opened up with one line of code high lighted!
I have no idea how the DevC++ IDE opened this header file for the vector include library. One line was highlighted! It mentioned that I had to use a compiler parameter: "-std=C++1". So I went into compiler options and put this line in the C++ compiler parameters. Voila, now everything is compiling and the code example works as expected!!! So why didn't the original compiler work with vectors? I have no idea why that header file showed up? If I hadn't gotten lucky with that vector header file showing up, how would I have even solved the problem?
syd / wt1v

Top comments (1)

Collapse
 
syd_71 profile image
sydney

fixed with a lot of experimentation