Jump to content
  • Advertisement
Sign in to follow this  
pex22

fatal error C1001: INTERNAL COMPILER ERROR

This topic is 5159 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i use Visual C++ 6.0 Standard Edition SP6, but i think the error is an out of memory error.. it doesn't appear when i remove:
struct color
{
	color() {}
	color(float r,float g,float b,float a=0.0)
	{
		this->r=r;
		this->g=g;
		this->b=b;
		this->a=a;
	}
	void operator = (const color c)
	{
		this->r=c.r;
		this->g=c.g;
		this->b=c.b;
		this->a=c.a;
	};
	float r,g,b,a;
};


or the vector struct (the color struct is 16 bytes(i used sizeof(), its smaller than the vector struct)) when i got this error in the beginning i also got a warning that says '/0b0' is unknown (i couldn't find it in the project options). so i added this '/0b0' and then removed it, and now i dont get this warning anymore. the fatal error points to the line:
	C = 2,				/* The Z value of the plane's normal */

its a part of my frustum culling (the frustum culling works well, now i tried to implement a good lighting class) btw, i dont really think i wrote something new so i got this error. i was trying to find out a solution to some weird error which isn't fatal. and i got the '/0b0' warning before i installed SP6. does anyone here know where i get the sp version in vc6? just to make sure i have sp6 installed well. (its the second question. the first is why i get this error and how to solve it) thanks in advance, pex.

Share this post


Link to post
Share on other sites
Advertisement
I think I've only had that error when trying to do something with templates that VC6 couldn't do.

Share this post


Link to post
Share on other sites
Look at operator=. There's a semi-colon at the end which shouldn't be there. I seem to recall this particular thing causing an ICE.

Share this post


Link to post
Share on other sites
  • You don't need to overload operator =. C++ compilers predefine operator = for you that does the exact same thing.
  • (if you still want to overload it) operator = should return a color&. return *this; at the end of the function.

    Share this post


    Link to post
    Share on other sites
    Quote:
    Original post by Archi
    Quote:

    struct color
    {
    color() {}


    Is that a class or a structure?
    C++ only differentiates between a struct and a class by the fact that a struct is by default public and a class is by default private.

    struct A { void foo(); } //foo is public
    class A { void foo(); } //foo is private

    Share this post


    Link to post
    Share on other sites
    ok guys, so i commented the operator=, but still same error..
    1) any more ideas?..
    Quote:
    Original post by pex22
    does anyone here know where i get the sp version in vc6? just to make sure i have sp6 installed well. (its the second question. the first is why i get this error and how to solve it)

    2) nobody here knows how to get the sp version in vc6?..
    Quote:
    Original post by pex22
    or the vector struct (the color struct is 16 bytes(i used sizeof(), its smaller than the vector struct))

    dont forget the error is not in the color struct, because when i remove the vector struct i also get this error (the vector struct is old, it worked before this error. the color struct is new)

    how can i do that the vc will use more ram than it does now? i still think the memory is the problem..so i have to try it.

    Share this post


    Link to post
    Share on other sites
    Quote:
    Original post by silvermace
    Quote:
    Original post by Archi
    Quote:

    struct color
    {
    color() {}


    Is that a class or a structure?
    C++ only differentiates between a struct and a class by the fact that a struct is by default public and a class is by default private.

    struct A { void foo(); } //foo is public
    class A { void foo(); } //foo is private


    And structs inherit publicly by default and classes inherit privately by default.

    Share this post


    Link to post
    Share on other sites
    Download Borland C++ (command line compiler 5.5) (It's completely gratis, although it is a 9MB download) and try compiling the files one by one, see what borland says. Or you could try gcc. Or quickc.
    Just try anything other than VC. :)
    Although, this option really is a last resort..

    //Edit:
    operator = should also take its argument as a const color&

    Share this post


    Link to post
    Share on other sites
    Sign in to follow this  

    • Advertisement
    ×

    Important Information

    By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

    GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

    Sign me up!