|
-
October 9th, 2007, 09:40 AM
#8
Re: C++ Vector question??
 Originally Posted by Eli Gassert
vector does not belong to the global namespace. Under your includes, add
If you do'nt add that using statement (or the more general [but less desirable] using namespace std  then you must qualify your use of vector by its namespace:
Code:
void printarray(std::vector<int>* invector);
A side note, why are you passing a vector by pointer?
First off I am a novice with C++, if it wasn't obvious
I don't think I am passing by pointer. I am passing a vector to the prinarray method, and then assigning invector as the pointer to the vector. Please correct me if that is not true, thanks for your reply.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|