HELP !! Internal Compiler Error in C++ !?!?

Grab your favourite IDE and tinker with the innards of game engines

HELP !! Internal Compiler Error in C++ !?!?

Postby jaddorii on Fri Apr 27, 2007 1:34 pm

Everytime I make a class (based on the knowledge I have right now .... wich is not so good :P) I get an error saying:

--Configuration: classes3 - Win32 Debug--
Compiling...
classes3.cpp
C:\Documents and Settings\Niclas\Skrivbord\Codeing\Träning\Nr 4\classes3\classes3.cpp(21) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
Error executing cl.exe.

classes3.exe - 1 error(s), 0 warning(s)

I tried to go to the Technical Support but it told me to reainstall MSDN ?!?! What should I do?

Btw here's the code (its very basic... just traning):

//Class test #2

#include <iostream>
#include <iomanip>
using namespace std;

class Soldier
{
public:
Soldier();
~Soldier();

void setsoldier (int a);
int readsoldier();

protected:
int currentsoldier;
};

Soldier::Soldier
{
currentsoldier = 0;
}
Soldier::~Soldier
{
}

void Soldier::setsoldier (int a)
{
currentsoldier = a;
}
int Soldier::readsoldier()
{
return currentsoldier;
}

int main()
{
Soldier Sold1;
Sold1.setsoldier (500);

cout << endl
<< "You have " << Sold1.readsoldier << " soldiers"
<< endl;
return 0;
}
Dom Dom Dom... another one bites de_dust
User avatar
jaddorii
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jul 16, 2006 10:24 am

Postby ChopperDave on Fri Apr 27, 2007 1:46 pm

I Googled around, and it looks like this error is a bug in Visual Studio that was fixed with later patches. What version of Visual Studio are you using? Does it have the latest patches/service packs applied to it?
User avatar
ChopperDave
Rockstar San Diego
 
Joined: Wed Feb 21, 2007 6:06 pm

Postby jaddorii on Fri Apr 27, 2007 1:51 pm

Ehh ... how to install patches to C++ ? :oops:

Im nOOb sry :P
Dom Dom Dom... another one bites de_dust
User avatar
jaddorii
1337 p0st3r
1337 p0st3r
 
Joined: Sun Jul 16, 2006 10:24 am

Postby ChopperDave on Fri Apr 27, 2007 3:30 pm

Me neither :? . I've never installed a patch for Visual Studio that I'm aware of. I would assume you can download a patch of some kind from Microsoft, and it would be an EXE file that you just run.
User avatar
ChopperDave
Rockstar San Diego
 
Joined: Wed Feb 21, 2007 6:06 pm

Return to Programming

Who is online

Users browsing this forum: No registered users