Does anyone here use g++ ? I'm getting some weird error when going from VS 2003 code.

OK, there error from my previous post…
It seems that it is not related to glut or Opengl linking, but to my code… But the code has cimpiled ok under VS2002, 2003 and Borland… If someone coudl please look at this (maybe it is a known ‘bug’ in g++) I’d really appreciate it.
Basically, the error I’m getting is this:
Asteroids.cpp: In method Asteroids::Asteroids(const vector<Point,allocator<Point> > &)': Asteroids.cpp:23: warning: assignment toint’ from double' Asteroids.cpp:31: warning: assignment toint’ from double' Asteroids.cpp:38: warning: assignment toint’ from double' AsteroidsComposite.cpp: In methodvoid
AsteroidsComposite: nHit(int)’:
AsteroidsComposite.cpp:154: no matching function for call to `vector<vector<Point,allocator<Point> > *,allocator<vector<Point,allocator<Point> > *> >::at (int)’

Again, I don’t quite understand what it means :frowning: It worked 100% well with the above compilers…

Huge thanks,
Luke

A lot of code did not compile anymore after stricter checking was the new default a couple years ago. Particulary for the STL was a “using namespace std;” needed.

Everything has ‘using namespace std;’ at the beginning though, I checked that…

Are the types correct? That also includes const if you are using it.
Are you building with g++ or gcc?

Post some code from your AsteroidComposite class where the errors are being reported.

[This message has been edited by Deiussum (edited 10-27-2003).]