473,382 Members | 1,437 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,382 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 2553

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...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.