Advertisement

Problems with MSVC++ 6...

Started by March 08, 2003 01:50 PM
27 comments, last by cippyboy 21 years, 11 months ago
The most stupid thing in all MSVC ... float B[3]; float A[]={0,1,2}; B=A;//This is an error...how come ? And then I rewrite: float B[3]; float A[3];A[0]=0;A[1]=1;A[2]=2; B=a;//Again error...why the hack is that ? second error: #include <vector> //#include //sometimes... vector I;//''vector'' undeclared...is he stupid or what ? In some cases it works...why does he need the long definition in the begining of the stupid precompiled header ? and the most Stupid thing is #define WIN32_LEAN_AND_MEAN MYASS sigh...I really don`t like MSVC

Relative Games - My apps

Maybe you should educate yourself before blaming your compiler.

quote:

B=A;//This is an error...how come ?


Arrays are not first class types in c++. You cannot assign them.

quote:
vector I;//''vector'' undeclared...is he stupid or what ?

vector, and most other components of the standard library, are in their own namespace, std. To refer to a vector, you have to either say
std::vector
or using std::vector;
or using namespace std;
Advertisement
->Maybe you should educate yourself before blaming your compiler.
No shit!So how come Dev-C++ 4 accepts everything I`ve written there ? Ever heard of it ? Dev-C++ ? Ring a bell ?

Relative Games - My apps

Corection:
#include <vector>
//#include <stl.h>//sometimes...
vector I;//''vector'' undeclared...is he stupid or what ?
In some cases it works...why does he need the long definition
in the begining of the stupid precompiled header ?

Relative Games - My apps

What the heck is going on?
I am writing vector < int > I ;
and gets vector I;
?

Relative Games - My apps

quote:
Original post by cippyboy
So how come Dev-C++ 4 accepts everything I`ve written there ?


It's non-compliant?

btw, Dev-C++ is not a compiler, it's an IDE. What version of g++ are you using with it?

[edited by - sjelkjd on March 8, 2003 3:36:11 PM]
Advertisement
Dev C++ 4 ships with the MinGW modification of gcc 2.95.2, which is non-compliant with respect to namespace std. Essentially, it treats namespace std and the global namespace as interchangable.

For example:
#include <vector>class Cow {};vector <std::Cow> moo; 

will compile even though vector is in the std namespace and is not referenced as such, and Cow is in the global namespace and is referenced as being in the std namespace.
So the best way of = 2 arrays is to use a for ?
for(int y=0;y?????
It`s so stupid that 2 things of the same sizes not to be able to equal them...
it`s like saying that neither A=B..because A is A and B is B,and who are you to change that ?
Dev-C++ is way better in these kinda things...way better...

Relative Games - My apps

Again ? This is why you people space up ?
Uhh...
for( int y = 0 ; y < nrElements ; y ++ ) B [y] = A [y] ;

Relative Games - My apps

quote:
What the heck is going on?
I am writing vector < int > I ;
and gets vector I;
?

the silly server thinks you are trying to use html so put [ source ] [ /source ] tags aruond yuor code dumass

[edited by - YodaTheCoda on March 8, 2003 5:19:52 PM]

This topic is closed to new replies.

Advertisement