473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

vector


I was wondering why Visual Studio is not recognizing my vector
declarations properly.

I enter the following code :

#include <vector>

....
class whatever {

....

vector<aule_gl_window ** windows;

....

}
and it sometimes gives me an error like :

Missing semicolon after 'vector'

It does not seem to recognize anything after the identifier "vevtor"
Robin

Aug 9 '06 #1
5 2551

rs*******@sympatico.ca wrote:
I was wondering why Visual Studio is not recognizing my vector
declarations properly.

I enter the following code :

#include <vector>

...
class whatever {

...

vector<aule_gl_window ** windows;
Try std::vector. Are you sure you want a pointer to a vector?
>
...

}
and it sometimes gives me an error like :

Missing semicolon after 'vector'

It does not seem to recognize anything after the identifier "vevtor"
Robin
Cheers! --M

Aug 9 '06 #2

mlimber wrote:
>
Try std::vector. Are you sure you want a pointer to a vector?
I tried that and it does not work.

As for the pointer, this was my first big C++ project and there are a
few faux pas like this in my code.

Aug 9 '06 #3
On 9 Aug 2006 12:45:09 -0700, "rs*******@sympatico.ca"
<rs*******@sympatico.cawrote:
>
I was wondering why Visual Studio is not recognizing my vector
declarations properly.

I enter the following code :

#include <vector>

...
class whatever {

...

vector<aule_gl_window ** windows;

...

}
and it sometimes gives me an error like :

Missing semicolon after 'vector'

It does not seem to recognize anything after the identifier "vevtor"
Robin
Have you tried changing the name of your variable "windows" which
might be doing something strange to the MS compiler?

Failing that, can you get
std::vector<intintVec; to compile?

how about
std::vector<int*intPvec; ?

rossum
Aug 9 '06 #4
rs*******@sympatico.ca schrieb:
mlimber wrote:
>Try std::vector. Are you sure you want a pointer to a vector?

I tried that and it does not work.
Write a small example that shows the error and past the code here.

--
Thomas
Aug 9 '06 #5

Have you tried changing the name of your variable "windows" which
might be doing something strange to the MS compiler?

Failing that, can you get
std::vector<intintVec; to compile?

how about
std::vector<int*intPvec; ?

rossum
I'll give it a shot.

Aug 11 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: {AGUT2}=IWIK= | last post by:
Hello all, It's my fisrt post here and I am feeling a little stupid here, so go easy.. :) (Oh, and I've spent _hours_ searching...) I am desperately trying to read in an ASCII...
9
by: luigi | last post by:
Hi, I am trying to speed up the perfomance of stl vector by allocating/deallocating blocks of memory manually. one version of the code crashes when I try to free the memory. The other version...
7
by: Forecast | last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully. : // proj2.cc: returns a dynamic vector and prints out at main~~ : // : #include <iostream> : #include <vector> : : using...
34
by: Adam Hartshorne | last post by:
Hi All, I have the following problem, and I would be extremely grateful if somebody would be kind enough to suggest an efficient solution to it. I create an instance of a Class A, and...
10
by: Bob | last post by:
Here's what I have: void miniVector<T>::insertOrder(miniVector<T>& v,const T& item) { int i, j; T target; vSize += 1; T newVector; newVector=new T;
8
by: Ross A. Finlayson | last post by:
I'm trying to write some C code, but I want to use C++'s std::vector. Indeed, if the code is compiled as C++, I want the container to actually be std::vector, in this case of a collection of value...
16
by: Martin Jørgensen | last post by:
Hi, I get this using g++: main.cpp:9: error: new types may not be defined in a return type main.cpp:9: note: (perhaps a semicolon is missing after the definition of 'vector') main.cpp:9:...
23
by: Sanjay Kumar | last post by:
Folks, I am getting back into C++ after a long time and I have this simple question: How do pyou ass a STL container like say a vector or a map (to and from a function) ? function: ...
6
by: zl2k | last post by:
hi, there I am using a big, sparse binary array (size of 256^3). The size may be changed in run time. I first thought about using the bitset but found its size is unchangeable. If I use the...
24
by: toton | last post by:
Hi, I want to have a vector like class with some additional functionality (cosmetic one). So can I inherit a vector class to add the addition function like, CorresVector : public...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.