• Advertisement
Sign in to follow this  

Problem with Very Simple Vector Container C++

Recommended Posts

Hello, need help please, here is some simple example Visual C++ code:

 

#include <vector>

.

.

.

int i = 1;

std::vector<int> myvector;

myvector.push_back(i);

 

It seems no matter what I do the myvector right before the command push_back has a red squiggle!

 

I searched for vector in the C drive and there was no match.  There were some search results for Vector2, Vector3, Vector2_8hpp_source.  Perhaps I need to get a vector header file from somewhere?

 

Thank you,

Josheir

 

Share this post


Link to post
Share on other sites
Advertisement

Well I'm using some classes, so it knows its C++.  I'm thinking because the file search didn't  turn up a file : vector.h that this could be the problem?

 

Thanks again,

josheir

 

This is my first try using containers.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement