VC++ 6.0 SP4 Fatal Compiler Error C1001 
Author Message
 VC++ 6.0 SP4 Fatal Compiler Error C1001

Hello All,

I'm at my wit's end! The compiler error message is below, followed by the
program code. I've installed SP 4 with no help and tried the first work
around (removing compiler option /GX) recommended at;

http://www.*-*-*.com/
n&FR=0

All suggestions welcomed; all fixes rewarded (terms negociable!).

Thanks,

Bill Barnett

--------------------Configuration: Bernoulli - Win32
Debug--------------------
Compiling...
Bernoulli.cpp
c:\program files\microsoft visual studio\vc98\include\istream(547) : warning
C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify -GX
c:\my documents\billy\school\2000-4
autumn\20eces471\bernoulli\rational.h(29) : 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.

Bernoulli.obj - 1 error(s), 1 warning(s)

--------------------Begin Rational.h--------------------

#ifndef RATIONAL_H
#define RATIONAL_H

#include <iostream>
using namespace std;

class Rational
{
public:
 Rational(void);
 Rational(long);       // Numerator
 Rational(long, long); // Numerator, Denomenator
 int invalid();
 long gcd(long, long);
 friend Rational operator - (const Rational);
 friend Rational operator + (const Rational, const Rational);
 friend Rational operator - (const Rational, const Rational);
 friend Rational operator * (const Rational, const Rational);
 friend int operator == (const Rational &a, const Rational &b);
 friend istream &operator >> (istream &in, Rational &r);
 friend ostream &operator << (ostream &out, Rational &r);
private:
 long Num;
 long Denom;

Quote:
};

#endif

--------------------End Rational.h--------------------

--------------------Begin Rational.cpp--------------------

#include "Rational.h"
using namespace std;

Rational::Rational(void)
{
 // Initialize a rational number equal to zero.
 Num = 0;
 Denom = 1;

Quote:
}

Rational::Rational(long n)
{
 // Initialize the whole number as a rational
 Num = n;
 Denom = 1;

Quote:
}

Rational::Rational(long n, long d)
{
 // Variable dictionary
 long g; // holder for gcd value

 // Initialize private data members
 Num = n;
 Denom = d;

 // Correct formating so that either only the numerator
 // carries the negative sign or neither carries it
 if (((Num < 0) && (Denom < 0)) || ((Num >= 0) && (Denom < 0)))
 {
  Num = -Num;
  Denom = -Denom;
 }

 // Determine the greatest common divisor and simplify the
 // numerator and denominator if necessary
 g = gcd(Num, Denom);
 Num = Num / g;
 Denom = Denom / g;

Quote:
}

int Rational::invalid()
{
 // Return true if denominator is zero
 return Denom == 0;

Quote:
}

long Rational::gcd(long a, long b)
{
 // Variable dictionary
 long r = (a < 0) ? -a : a; // holder for remainder less sign
 long g = b; // holder for gcd
 long d; // holder for dividend

 // While the remainder does not equal zero...
 while(r != 0)
 {
  d = g; // ...set dividend to the previous gcd value...
  g = r; // ...set gcd to previous remainder value...
  r = d % g; // ...and take the remainder of the new values
 }

 // Return the computed gcd value
 return g;

Quote:
}

Rational operator - (const Rational a)
{
 // Return rational with negated numerator
 return Rational(-a.Num, a.Denom);

Quote:
}

Rational operator + (const Rational a, const Rational b)
{
 // Return sum from simple addition algorithm
 return Rational(a.Num * b.Denom + b.Num * a.Denom, a.Denom * b.Denom);

Quote:
}

Rational operator - (const Rational a, const Rational b)
{
 // Return sum from simple subtraction algorithm
 return Rational(a.Num * b.Denom + -b.Num * a.Denom, a.Denom * b.Denom);

Quote:
}

Rational operator * (const Rational a, const Rational b)
{
 // Return product of numerators and denomenators
 return Rational(a.Num * b.Num, a.Denom * b.Denom);

Quote:
}

int operator == (const Rational &a, const Rational &b)
{
 // Return true if values are equivalent
 return ((a.Num == b.Num) && (a.Denom == b.Denom));

Quote:
}

istream &operator >> (istream &in, Rational &r)
{
 // Variable dictionary
 char slash; // buffer for slash character

 // Get input data and make assignment
 in >> r.Num >> slash >> r.Denom;

 // Return the input stream
 return in;

Quote:
}

ostream &operator << (ostream &out, Rational &r)
{
 // Output properly formatted number
 // If denomenator is one...
 if (r.Denom == 1)
  // ...use whole number format...
  out << r.Num;
 else
  // ...else use rational number format
  out << r.Num << "/" << r.Denom;

 // Return the output stream
 return out;

Quote:
}

--------------------End Rational.cpp--------------------

--------------------Begin Bernoulli.cpp--------------------

#include <iostream>    // Standard I/O access
#include <fstream>     // File output access
#include "Rational.h"  // Rational number manipulation
using namespace std;

const int MAX = 16;                               // Matrix dimension
constant
int header(ostream &out, int x);                  // Output header function
int body(ostream &out, int x, Rational m[][MAX]); // Output body function

int main()
{
 // Variable Dictionary
 char response = 'y';                          // Proceed variable
 int m = 0;                                    // Input value
 ofstream fout("Bernoulli.txt", ios::out);     // Optional output file
 Rational matrix[MAX][MAX];                    // Bernoulli value matrix

 cout << "This program will compute all the Bernoulli coefficients\n"
  << "B(j,k) for k <= m for any given m from 1 to " << MAX - 1
  << ".\n\nPlease enter an m value from 1 to " << MAX - 1 << ": ";
 cin >> m;

 if (m < 1 || m > (MAX - 1))
 {
  cout << "\n" << m << " is out of the specified range. ";
  m = (m % (MAX - 1)) + 1;
  cout << "Using " << m << " instead.\n";
 }

 // Initialize the matrix
 for (int j = 0; j < MAX; j++)
 {
  for (int i = 0; i < MAX; i++)
  {
   if (i == 0 || i == j)
    matrix[j][i] = Rational(1,1);
  }
 }

 // Do magic here...

 // Output Bernoulli matrix
 if (m > 7)
 {
  cout << "\nFor m > 7 text output is recommended. Output results\nto"
   << " \"Bernoulli.txt\" [y/n] ";
  cin >> response;
  if ((response == 'y') || (response == 'Y'))
  {
   header(fout, m);
   body(fout, m, matrix);
   cout << "\nOutput complete.\n\n";
  }
  else
  {
   cout << "\nScreen output may be distorted! Continue output to "
    << "screen? [y/n] ";
   cin >> response;
   if ((response == 'y') || (response == 'Y'))
   {
    header(cout, m);
    body(cout, m, matrix);
   }
   else
   {
    header(fout, m);
    body(fout, m, matrix);
    cout << "\nOutput complete.\n\n";
   }
  }
 }
 else
 {
  header(cout, m);
  body(cout, m, matrix);
 }

 return 0;

Quote:
}

int header(ostream &out, int x)
{
 out << "\nTable of values of B(j,k) for 0 <= k <= " << x <<":\n\n";
 out << "  j =\t";

 for (int i = 0; i <= x; i++)
  out << i + 1 << "\t";

 out << "\n\n";

 return 0;

Quote:
}

int body(ostream &out, int x, Rational m[][MAX])
{
 out << "k = ";
 for (int j = 0; j<= x; j++)
 {
  if (j == 0)
   out << j << "\t";
  else
   out << "    " << j << "\t";

  for (int i = 0; i <= x; i++)
  {
   if (m[j][i] == Rational(0,0))
    out << "   ";
   else
    out << m[j][i] << "\t";
  }
  out << "\n\n";
 }

 return 0;

Quote:
}

--------------------End Bernoulli.cpp--------------------


Tue, 22 Apr 2003 03:00:00 GMT  
 VC++ 6.0 SP4 Fatal Compiler Error C1001

Are you absolutely certain SP4 has been applied?  Your problem is documented
here:

http://support.microsoft.com/support/kb/articles/Q192/5/39.ASP?LN=EN-...
n&FR=0

In general, it's a bad idea to put a using namespace std; in a header file.
It destroys the purpose of namespaces, and clutters the global namespace.

The problem was fixed in SP3.  While it's possible that the bug reappeared
in SP4, I doubt it.  I'd be suspect of whether the Service Pack was properly
applied.


Quote:
> Hello All,

> I'm at my wit's end! The compiler error message is below, followed by the
> program code. I've installed SP 4 with no help and tried the first work
> around (removing compiler option /GX) recommended at;

http://support.microsoft.com/support/kb/articles/q259/7/46.asp?LN=EN-...
Quote:
> n&FR=0

> All suggestions welcomed; all fixes rewarded (terms negociable!).

> Thanks,

> Bill Barnett

> --------------------Configuration: Bernoulli - Win32
> Debug--------------------
> Compiling...
> Bernoulli.cpp
> c:\program files\microsoft visual studio\vc98\include\istream(547) :
warning
> C4530: C++ exception handler used, but unwind semantics are not enabled.
> Specify -GX
> c:\my documents\billy\school\2000-4
> autumn\20eces471\bernoulli\rational.h(29) : 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.

> Bernoulli.obj - 1 error(s), 1 warning(s)

> --------------------Begin Rational.h--------------------

> #ifndef RATIONAL_H
> #define RATIONAL_H

> #include <iostream>
> using namespace std;

> class Rational
> {
> public:
>  Rational(void);
>  Rational(long);       // Numerator
>  Rational(long, long); // Numerator, Denomenator
>  int invalid();
>  long gcd(long, long);
>  friend Rational operator - (const Rational);
>  friend Rational operator + (const Rational, const Rational);
>  friend Rational operator - (const Rational, const Rational);
>  friend Rational operator * (const Rational, const Rational);
>  friend int operator == (const Rational &a, const Rational &b);
>  friend istream &operator >> (istream &in, Rational &r);
>  friend ostream &operator << (ostream &out, Rational &r);
> private:
>  long Num;
>  long Denom;
> };

> #endif

> --------------------End Rational.h--------------------

> --------------------Begin Rational.cpp--------------------

> #include "Rational.h"
> using namespace std;

> Rational::Rational(void)
> {
>  // Initialize a rational number equal to zero.
>  Num = 0;
>  Denom = 1;
> }

> Rational::Rational(long n)
> {
>  // Initialize the whole number as a rational
>  Num = n;
>  Denom = 1;
> }

> Rational::Rational(long n, long d)
> {
>  // Variable dictionary
>  long g; // holder for gcd value

>  // Initialize private data members
>  Num = n;
>  Denom = d;

>  // Correct formating so that either only the numerator
>  // carries the negative sign or neither carries it
>  if (((Num < 0) && (Denom < 0)) || ((Num >= 0) && (Denom < 0)))
>  {
>   Num = -Num;
>   Denom = -Denom;
>  }

>  // Determine the greatest common divisor and simplify the
>  // numerator and denominator if necessary
>  g = gcd(Num, Denom);
>  Num = Num / g;
>  Denom = Denom / g;
> }

> int Rational::invalid()
> {
>  // Return true if denominator is zero
>  return Denom == 0;
> }

> long Rational::gcd(long a, long b)
> {
>  // Variable dictionary
>  long r = (a < 0) ? -a : a; // holder for remainder less sign
>  long g = b; // holder for gcd
>  long d; // holder for dividend

>  // While the remainder does not equal zero...
>  while(r != 0)
>  {
>   d = g; // ...set dividend to the previous gcd value...
>   g = r; // ...set gcd to previous remainder value...
>   r = d % g; // ...and take the remainder of the new values
>  }

>  // Return the computed gcd value
>  return g;
> }

> Rational operator - (const Rational a)
> {
>  // Return rational with negated numerator
>  return Rational(-a.Num, a.Denom);
> }

> Rational operator + (const Rational a, const Rational b)
> {
>  // Return sum from simple addition algorithm
>  return Rational(a.Num * b.Denom + b.Num * a.Denom, a.Denom * b.Denom);
> }

> Rational operator - (const Rational a, const Rational b)
> {
>  // Return sum from simple subtraction algorithm
>  return Rational(a.Num * b.Denom + -b.Num * a.Denom, a.Denom * b.Denom);
> }

> Rational operator * (const Rational a, const Rational b)
> {
>  // Return product of numerators and denomenators
>  return Rational(a.Num * b.Num, a.Denom * b.Denom);
> }

> int operator == (const Rational &a, const Rational &b)
> {
>  // Return true if values are equivalent
>  return ((a.Num == b.Num) && (a.Denom == b.Denom));
> }

> istream &operator >> (istream &in, Rational &r)
> {
>  // Variable dictionary
>  char slash; // buffer for slash character

>  // Get input data and make assignment
>  in >> r.Num >> slash >> r.Denom;

>  // Return the input stream
>  return in;
> }

> ostream &operator << (ostream &out, Rational &r)
> {
>  // Output properly formatted number
>  // If denomenator is one...
>  if (r.Denom == 1)
>   // ...use whole number format...
>   out << r.Num;
>  else
>   // ...else use rational number format
>   out << r.Num << "/" << r.Denom;

>  // Return the output stream
>  return out;
> }

> --------------------End Rational.cpp--------------------

> --------------------Begin Bernoulli.cpp--------------------

> #include <iostream>    // Standard I/O access
> #include <fstream>     // File output access
> #include "Rational.h"  // Rational number manipulation
> using namespace std;

> const int MAX = 16;                               // Matrix dimension
> constant
> int header(ostream &out, int x);                  // Output header
function
> int body(ostream &out, int x, Rational m[][MAX]); // Output body function

> int main()
> {
>  // Variable Dictionary
>  char response = 'y';                          // Proceed variable
>  int m = 0;                                    // Input value
>  ofstream fout("Bernoulli.txt", ios::out);     // Optional output file
>  Rational matrix[MAX][MAX];                    // Bernoulli value matrix

>  cout << "This program will compute all the Bernoulli coefficients\n"
>   << "B(j,k) for k <= m for any given m from 1 to " << MAX - 1
>   << ".\n\nPlease enter an m value from 1 to " << MAX - 1 << ": ";
>  cin >> m;

>  if (m < 1 || m > (MAX - 1))
>  {
>   cout << "\n" << m << " is out of the specified range. ";
>   m = (m % (MAX - 1)) + 1;
>   cout << "Using " << m << " instead.\n";
>  }

>  // Initialize the matrix
>  for (int j = 0; j < MAX; j++)
>  {
>   for (int i = 0; i < MAX; i++)
>   {
>    if (i == 0 || i == j)
>     matrix[j][i] = Rational(1,1);
>   }
>  }

>  // Do magic here...

>  // Output Bernoulli matrix
>  if (m > 7)
>  {
>   cout << "\nFor m > 7 text output is recommended. Output results\nto"
>    << " \"Bernoulli.txt\" [y/n] ";
>   cin >> response;
>   if ((response == 'y') || (response == 'Y'))
>   {
>    header(fout, m);
>    body(fout, m, matrix);
>    cout << "\nOutput complete.\n\n";
>   }
>   else
>   {
>    cout << "\nScreen output may be distorted! Continue output to "
>     << "screen? [y/n] ";
>    cin >> response;
>    if ((response == 'y') || (response == 'Y'))
>    {
>     header(cout, m);
>     body(cout, m, matrix);
>    }
>    else
>    {
>     header(fout, m);
>     body(fout, m, matrix);
>     cout << "\nOutput complete.\n\n";
>    }
>   }
>  }
>  else
>  {
>   header(cout, m);
>   body(cout, m, matrix);
>  }

>  return 0;
> }

> int header(ostream &out, int x)
> {
>  out << "\nTable of values of B(j,k) for 0 <= k <= " << x <<":\n\n";
>  out << "  j =\t";

>  for (int i = 0; i <= x; i++)
>   out << i + 1 << "\t";

>  out << "\n\n";

>  return 0;
> }

> int body(ostream &out, int x, Rational m[][MAX])
> {
>  out << "k = ";
>  for (int j = 0; j<= x; j++)
>  {
>   if (j == 0)
>    out << j << "\t";
>   else
>    out << "    " << j << "\t";

>   for (int i = 0; i <= x; i++)
>   {
>    if (m[j][i] == Rational(0,0))
>     out << "   ";
>    else
>     out << m[j][i] << "\t";
>   }
>   out << "\n\n";
>  }

>  return 0;
> }

> --------------------End Bernoulli.cpp--------------------



Tue, 22 Apr 2003 03:00:00 GMT  
 VC++ 6.0 SP4 Fatal Compiler Error C1001
Hello Erik,

Thank you for your response. I used the single download of SP4 and exactly
followed the direction located at;

http://msdn.microsoft.com/vstudio/sp/vs6sp4/full.asp?id=01

I removed "using namespace std;" from the "Rational.h" header file and now
receive a list of compiler errors which indicate that my class code is not
well formed though I'm convinced it is. The first error is;

--------------------Configuration: Bernoulli - Win32
Debug--------------------
Compiling...
Bernoulli.cpp
c:\my documents\billy\school\2000-4
autumn\20eces471\bernoulli\rational.h(33) : error C2143: syntax error :
missing ';' before '&'

I've poured over the code many times for the missing ";" without success.
Any suggerstions are welcome. I've been stuck at this point for a week.
Perhaps I should consider a career as a hairdresser? (You would laugh if you
could see my hair right now!)

Thanks again,

Bill Barnett


Quote:

> Are you absolutely certain SP4 has been applied?  Your problem is
documented
> here:

http://support.microsoft.com/support/kb/articles/Q192/5/39.ASP?LN=EN-...
Quote:
> n&FR=0

> In general, it's a bad idea to put a using namespace std; in a header
file.
> It destroys the purpose of namespaces, and clutters the global namespace.

> The problem was fixed in SP3.  While it's possible that the bug reappeared
> in SP4, I doubt it.  I'd be suspect of whether the Service Pack was
properly
> applied.



> > Hello All,

> > I'm at my wit's end! The compiler error message is below, followed by
the
> > program code. I've installed SP 4 with no help and tried the first work
> > around (removing compiler option /GX) recommended at;

http://support.microsoft.com/support/kb/articles/q259/7/46.asp?LN=EN-...

- Show quoted text -

Quote:
> > n&FR=0

> > All suggestions welcomed; all fixes rewarded (terms negociable!).

> > Thanks,

> > Bill Barnett

> > --------------------Configuration: Bernoulli - Win32
> > Debug--------------------
> > Compiling...
> > Bernoulli.cpp
> > c:\program files\microsoft visual studio\vc98\include\istream(547) :
> warning
> > C4530: C++ exception handler used, but unwind semantics are not enabled.
> > Specify -GX
> > c:\my documents\billy\school\2000-4
> > autumn\20eces471\bernoulli\rational.h(29) : 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.

> > Bernoulli.obj - 1 error(s), 1 warning(s)

> > --------------------Begin Rational.h--------------------

> > #ifndef RATIONAL_H
> > #define RATIONAL_H

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

> > class Rational
> > {
> > public:
> >  Rational(void);
> >  Rational(long);       // Numerator
> >  Rational(long, long); // Numerator, Denomenator
> >  int invalid();
> >  long gcd(long, long);
> >  friend Rational operator - (const Rational);
> >  friend Rational operator + (const Rational, const Rational);
> >  friend Rational operator - (const Rational, const Rational);
> >  friend Rational operator * (const Rational, const Rational);
> >  friend int operator == (const Rational &a, const Rational &b);
> >  friend istream &operator >> (istream &in, Rational &r);
> >  friend ostream &operator << (ostream &out, Rational &r);
> > private:
> >  long Num;
> >  long Denom;
> > };

> > #endif

> > --------------------End Rational.h--------------------

> > --------------------Begin Rational.cpp--------------------

> > #include "Rational.h"
> > using namespace std;

> > Rational::Rational(void)
> > {
> >  // Initialize a rational number equal to zero.
> >  Num = 0;
> >  Denom = 1;
> > }

> > Rational::Rational(long n)
> > {
> >  // Initialize the whole number as a rational
> >  Num = n;
> >  Denom = 1;
> > }

> > Rational::Rational(long n, long d)
> > {
> >  // Variable dictionary
> >  long g; // holder for gcd value

> >  // Initialize private data members
> >  Num = n;
> >  Denom = d;

> >  // Correct formating so that either only the numerator
> >  // carries the negative sign or neither carries it
> >  if (((Num < 0) && (Denom < 0)) || ((Num >= 0) && (Denom < 0)))
> >  {
> >   Num = -Num;
> >   Denom = -Denom;
> >  }

> >  // Determine the greatest common divisor and simplify the
> >  // numerator and denominator if necessary
> >  g = gcd(Num, Denom);
> >  Num = Num / g;
> >  Denom = Denom / g;
> > }

> > int Rational::invalid()
> > {
> >  // Return true if denominator is zero
> >  return Denom == 0;
> > }

> > long Rational::gcd(long a, long b)
> > {
> >  // Variable dictionary
> >  long r = (a < 0) ? -a : a; // holder for remainder less sign
> >  long g = b; // holder for gcd
> >  long d; // holder for dividend

> >  // While the remainder does not equal zero...
> >  while(r != 0)
> >  {
> >   d = g; // ...set dividend to the previous gcd value...
> >   g = r; // ...set gcd to previous remainder value...
> >   r = d % g; // ...and take the remainder of the new values
> >  }

> >  // Return the computed gcd value
> >  return g;
> > }

> > Rational operator - (const Rational a)
> > {
> >  // Return rational with negated numerator
> >  return Rational(-a.Num, a.Denom);
> > }

> > Rational operator + (const Rational a, const Rational b)
> > {
> >  // Return sum from simple addition algorithm
> >  return Rational(a.Num * b.Denom + b.Num * a.Denom, a.Denom * b.Denom);
> > }

> > Rational operator - (const Rational a, const Rational b)
> > {
> >  // Return sum from simple subtraction algorithm
> >  return Rational(a.Num * b.Denom + -b.Num * a.Denom, a.Denom * b.Denom);
> > }

> > Rational operator * (const Rational a, const Rational b)
> > {
> >  // Return product of numerators and denomenators
> >  return Rational(a.Num * b.Num, a.Denom * b.Denom);
> > }

> > int operator == (const Rational &a, const Rational &b)
> > {
> >  // Return true if values are equivalent
> >  return ((a.Num == b.Num) && (a.Denom == b.Denom));
> > }

> > istream &operator >> (istream &in, Rational &r)
> > {
> >  // Variable dictionary
> >  char slash; // buffer for slash character

> >  // Get input data and make assignment
> >  in >> r.Num >> slash >> r.Denom;

> >  // Return the input stream
> >  return in;
> > }

> > ostream &operator << (ostream &out, Rational &r)
> > {
> >  // Output properly formatted number
> >  // If denomenator is one...
> >  if (r.Denom == 1)
> >   // ...use whole number format...
> >   out << r.Num;
> >  else
> >   // ...else use rational number format
> >   out << r.Num << "/" << r.Denom;

> >  // Return the output stream
> >  return out;
> > }

> > --------------------End Rational.cpp--------------------

> > --------------------Begin Bernoulli.cpp--------------------

> > #include <iostream>    // Standard I/O access
> > #include <fstream>     // File output access
> > #include "Rational.h"  // Rational number manipulation
> > using namespace std;

> > const int MAX = 16;                               // Matrix dimension
> > constant
> > int header(ostream &out, int x);                  // Output header
> function
> > int body(ostream &out, int x, Rational m[][MAX]); // Output body
function

> > int main()
> > {
> >  // Variable Dictionary
> >  char response = 'y';                          // Proceed variable
> >  int m = 0;                                    // Input value
> >  ofstream fout("Bernoulli.txt", ios::out);     // Optional output file
> >  Rational matrix[MAX][MAX];                    // Bernoulli value matrix

> >  cout << "This program will compute all the Bernoulli coefficients\n"
> >   << "B(j,k) for k <= m for any given m from 1 to " << MAX - 1
> >   << ".\n\nPlease enter an m value from 1 to " << MAX - 1 << ": ";
> >  cin >> m;

> >  if (m < 1 || m > (MAX - 1))
> >  {
> >   cout << "\n" << m << " is out of the specified range. ";
> >   m = (m % (MAX - 1)) + 1;
> >   cout << "Using " << m << " instead.\n";
> >  }

> >  // Initialize the matrix
> >  for (int j = 0; j < MAX; j++)
> >  {
> >   for (int i = 0; i < MAX; i++)
> >   {
> >    if (i == 0 || i == j)
> >     matrix[j][i] = Rational(1,1);
> >   }
> >  }

> >  // Do magic here...

> >  // Output Bernoulli matrix
> >  if (m > 7)
> >  {
> >   cout << "\nFor m > 7 text output is recommended. Output results\nto"
> >    << " \"Bernoulli.txt\" [y/n] ";
> >   cin >> response;
> >   if ((response == 'y') || (response == 'Y'))
> >   {
> >    header(fout, m);
> >    body(fout, m, matrix);
> >    cout << "\nOutput complete.\n\n";
> >   }
> >   else
> >   {
> >    cout << "\nScreen output may be distorted! Continue output to "
> >     << "screen? [y/n] ";
> >    cin >> response;
> >    if ((response == 'y') || (response == 'Y'))
> >    {
> >     header(cout, m);
> >     body(cout, m, matrix);
> >    }
> >    else
> >    {
> >     header(fout, m);
> >     body(fout, m, matrix);
> >     cout << "\nOutput complete.\n\n";
> >    }
> >   }
> >  }
> >  else
> >  {
> >   header(cout, m);
> >   body(cout, m, matrix);
> >  }

> >  return 0;
> > }

> > int header(ostream &out, int x)
> > {
> >  out << "\nTable of values of B(j,k) for 0 <= k <= " << x <<":\n\n";
> >  out << "  j =\t";

> >  for (int i = 0; i <= x; i++)
> >   out << i + 1 << "\t";

> >  out << "\n\n";

> >  return 0;
> > }

> > int body(ostream &out, int x, Rational m[][MAX])
> > {
> >  out << "k = ";
> >  for (int j = 0; j<= x; j++)
> >  {
> >   if (j == 0)
> >    out << j << "\t";
> >   else
> >    out << "    " << j << "\t";

> >   for (int i = 0; i <= x; i++)
> >   {
> >    if (m[j][i] == Rational(0,0))
> >     out << "   ";
> >    else
> >     out

...

read more »



Thu, 24 Apr 2003 03:00:00 GMT  
 VC++ 6.0 SP4 Fatal Compiler Error C1001

In bernoulli.cpp, near the top, you have the following:

constant
int header(ostream &out, int x);                  // Output header function

Constant is not a C++ keyword. You could change it to const, but that
would be wrong to because you don't want to mark the return value of
header() as const. Delete the word constant.

With that done your code compiles and links for me. I'm using VC++
6.0 SP 4 on Windows 2000.

If it still doesn't work for you, paste those three files into a new project
to see if that works. If it does, then find out what is different between the
two project's settings. If it doesn't work - I don't know.

Note: I have sometimes found that service packs applied from the network
do not get reliably applied. Your mileage may vary.

If you are going to disable C++ exception  handling, use #pragma warning()
to disable the warnings - just a suggestion.

Quote:

> Hello All,

> I'm at my wit's end! The compiler error message is below, followed by the
> program code. I've installed SP 4 with no help and tried the first work
> around (removing compiler option /GX) recommended at;

> http://support.microsoft.com/support/kb/articles/q259/7/46.asp?LN=EN-...
> n&FR=0

> All suggestions welcomed; all fixes rewarded (terms negociable!).

> Thanks,

> Bill Barnett

> --------------------Configuration: Bernoulli - Win32
> Debug--------------------
> Compiling...
> Bernoulli.cpp
> c:\program files\microsoft visual studio\vc98\include\istream(547) : warning
> C4530: C++ exception handler used, but unwind semantics are not enabled.
> Specify -GX
> c:\my documents\billy\school\2000-4
> autumn\20eces471\bernoulli\rational.h(29) : 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.

> Bernoulli.obj - 1 error(s), 1 warning(s)

> --------------------Begin Rational.h--------------------

> #ifndef RATIONAL_H
> #define RATIONAL_H

> #include <iostream>
> using namespace std;

> class Rational
> {
> public:
>  Rational(void);
>  Rational(long);       // Numerator
>  Rational(long, long); // Numerator, Denomenator
>  int invalid();
>  long gcd(long, long);
>  friend Rational operator - (const Rational);
>  friend Rational operator + (const Rational, const Rational);
>  friend Rational operator - (const Rational, const Rational);
>  friend Rational operator * (const Rational, const Rational);
>  friend int operator == (const Rational &a, const Rational &b);
>  friend istream &operator >> (istream &in, Rational &r);
>  friend ostream &operator << (ostream &out, Rational &r);
> private:
>  long Num;
>  long Denom;
> };

> #endif

> --------------------End Rational.h--------------------

> --------------------Begin Rational.cpp--------------------

> #include "Rational.h"
> using namespace std;

> Rational::Rational(void)
> {
>  // Initialize a rational number equal to zero.
>  Num = 0;
>  Denom = 1;
> }

> Rational::Rational(long n)
> {
>  // Initialize the whole number as a rational
>  Num = n;
>  Denom = 1;
> }

> Rational::Rational(long n, long d)
> {
>  // Variable dictionary
>  long g; // holder for gcd value

>  // Initialize private data members
>  Num = n;
>  Denom = d;

>  // Correct formating so that either only the numerator
>  // carries the negative sign or neither carries it
>  if (((Num < 0) && (Denom < 0)) || ((Num >= 0) && (Denom < 0)))
>  {
>   Num = -Num;
>   Denom = -Denom;
>  }

>  // Determine the greatest common divisor and simplify the
>  // numerator and denominator if necessary
>  g = gcd(Num, Denom);
>  Num = Num / g;
>  Denom = Denom / g;
> }

> int Rational::invalid()
> {
>  // Return true if denominator is zero
>  return Denom == 0;
> }

> long Rational::gcd(long a, long b)
> {
>  // Variable dictionary
>  long r = (a < 0) ? -a : a; // holder for remainder less sign
>  long g = b; // holder for gcd
>  long d; // holder for dividend

>  // While the remainder does not equal zero...
>  while(r != 0)
>  {
>   d = g; // ...set dividend to the previous gcd value...
>   g = r; // ...set gcd to previous remainder value...
>   r = d % g; // ...and take the remainder of the new values
>  }

>  // Return the computed gcd value
>  return g;
> }

> Rational operator - (const Rational a)
> {
>  // Return rational with negated numerator
>  return Rational(-a.Num, a.Denom);
> }

> Rational operator + (const Rational a, const Rational b)
> {
>  // Return sum from simple addition algorithm
>  return Rational(a.Num * b.Denom + b.Num * a.Denom, a.Denom * b.Denom);
> }

> Rational operator - (const Rational a, const Rational b)
> {
>  // Return sum from simple subtraction algorithm
>  return Rational(a.Num * b.Denom + -b.Num * a.Denom, a.Denom * b.Denom);
> }

> Rational operator * (const Rational a, const Rational b)
> {
>  // Return product of numerators and denomenators
>  return Rational(a.Num * b.Num, a.Denom * b.Denom);
> }

> int operator == (const Rational &a, const Rational &b)
> {
>  // Return true if values are equivalent
>  return ((a.Num == b.Num) && (a.Denom == b.Denom));
> }

> istream &operator >> (istream &in, Rational &r)
> {
>  // Variable dictionary
>  char slash; // buffer for slash character

>  // Get input data and make assignment
>  in >> r.Num >> slash >> r.Denom;

>  // Return the input stream
>  return in;
> }

> ostream &operator << (ostream &out, Rational &r)
> {
>  // Output properly formatted number
>  // If denomenator is one...
>  if (r.Denom == 1)
>   // ...use whole number format...
>   out << r.Num;
>  else
>   // ...else use rational number format
>   out << r.Num << "/" << r.Denom;

>  // Return the output stream
>  return out;
> }

> --------------------End Rational.cpp--------------------

> --------------------Begin Bernoulli.cpp--------------------

> #include <iostream>    // Standard I/O access
> #include <fstream>     // File output access
> #include "Rational.h"  // Rational number manipulation
> using namespace std;

> const int MAX = 16;                               // Matrix dimension
> constant
> int header(ostream &out, int x);                  // Output header function
> int body(ostream &out, int x, Rational m[][MAX]); // Output body function

> int main()
> {
>  // Variable Dictionary
>  char response = 'y';                          // Proceed variable
>  int m = 0;                                    // Input value
>  ofstream fout("Bernoulli.txt", ios::out);     // Optional output file
>  Rational matrix[MAX][MAX];                    // Bernoulli value matrix

>  cout << "This program will compute all the Bernoulli coefficients\n"
>   << "B(j,k) for k <= m for any given m from 1 to " << MAX - 1
>   << ".\n\nPlease enter an m value from 1 to " << MAX - 1 << ": ";
>  cin >> m;

>  if (m < 1 || m > (MAX - 1))
>  {
>   cout << "\n" << m << " is out of the specified range. ";
>   m = (m % (MAX - 1)) + 1;
>   cout << "Using " << m << " instead.\n";
>  }

>  // Initialize the matrix
>  for (int j = 0; j < MAX; j++)
>  {
>   for (int i = 0; i < MAX; i++)
>   {
>    if (i == 0 || i == j)
>     matrix[j][i] = Rational(1,1);
>   }
>  }

>  // Do magic here...

>  // Output Bernoulli matrix
>  if (m > 7)
>  {
>   cout << "\nFor m > 7 text output is recommended. Output results\nto"
>    << " \"Bernoulli.txt\" [y/n] ";
>   cin >> response;
>   if ((response == 'y') || (response == 'Y'))
>   {
>    header(fout, m);
>    body(fout, m, matrix);
>    cout << "\nOutput complete.\n\n";
>   }
>   else
>   {
>    cout << "\nScreen output may be distorted! Continue output to "
>     << "screen? [y/n] ";
>    cin >> response;
>    if ((response == 'y') || (response == 'Y'))
>    {
>     header(cout, m);
>     body(cout, m, matrix);
>    }
>    else
>    {
>     header(fout, m);
>     body(fout, m, matrix);
>     cout << "\nOutput complete.\n\n";
>    }
>   }
>  }
>  else
>  {
>   header(cout, m);
>   body(cout, m, matrix);
>  }

>  return 0;
> }

> int header(ostream &out, int x)
> {
>  out << "\nTable of values of B(j,k) for 0 <= k <= " << x <<":\n\n";
>  out << "  j =\t";

>  for (int i = 0; i <= x; i++)
>   out << i + 1 << "\t";

>  out << "\n\n";

>  return 0;
> }

> int body(ostream &out, int x, Rational m[][MAX])
> {
>  out << "k = ";
>  for (int j = 0; j<= x; j++)
>  {
>   if (j == 0)
>    out << j << "\t";
>   else
>    out << "    " << j << "\t";

>   for (int i = 0; i <= x; i++)
>   {
>    if (m[j][i] == Rational(0,0))
>     out << "   ";
>    else
>     out << m[j][i] << "\t";
>   }
>   out << "\n\n";
>  }

>  return 0;
> }

> --------------------End Bernoulli.cpp--------------------

--
.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.humongous.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.


Fri, 25 Apr 2003 03:00:00 GMT  
 VC++ 6.0 SP4 Fatal Compiler Error C1001
Hello Bruce,

Thanks for your response. I believe the "constant" to which you refer
belonged to a comment on the previous line of code. It was likely a result
of the nested message formatting process, presumably by your e-mail client.
I have recently been instructed to submit my work in a single file, the
contents of which I have pasted at the end of this message (without
comments) which, regrettably, still returns the fatal compiler error. I
would be most curious to see if the code compiles on your machine. Thus I
would suspect my installation of SP4, as another commentor has suggested.

Thanks again,

Bill


In bernoulli.cpp, near the top, you have the following:
constant
int header(ostream &out, int x);                  // Output header function
Constant is not a C++ keyword. You could change it to const, but that
would be wrong to because you don't want to mark the return value of
header() as const. Delete the word constant.
With that done your code compiles and links for me. I'm using VC++
6.0 SP 4 on Windows 2000.
If it still doesn't work for you, paste those three files into a new project
to see if that works. If it does, then find out what is different between
the
two project's settings. If it doesn't work - I don't know.
Note: I have sometimes found that service packs applied from the network
do not get reliably applied. Your mileage may vary.
If you are going to disable C++ exception  handling, use #pragma warning()
to disable the warnings - just a suggestion.
[SNIP - original code]

.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.humongous.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.

#include <iostream>
#include <fstream>

using namespace std;

class Rational
{
public:
 Rational(void);
 Rational(long);
 Rational(long, long);
 int invalid();
 long gcd(long, long);
 friend Rational operator - (const Rational);
 friend Rational operator + (const Rational, const Rational);
 friend Rational operator - (const Rational, const Rational);
 friend Rational operator * (const Rational, const Rational);
 friend int operator == (const Rational &a, const Rational &b);
 friend istream &operator >> (istream &in, Rational &r);
 friend ostream &operator << (ostream &out, Rational &r);
private:
 long Num;
 long Denom;

Quote:
};

const int MAX = 16;
int header(ostream &out, int x);
int body(ostream &out, int x, Rational m[][MAX]);

int main()
{
 char response = 'y';
 int m = 0;
 ofstream fout("Bernoulli.txt", ios::out);
 Rational matrix[MAX][MAX];

 cout << "This program will compute all the Bernoulli coefficients\n"
  << "B(j,k) for k <= m for any given m from 1 to " << MAX - 1
  << ".\n\nPlease enter an m value from 1 to " << MAX - 1 << ": ";
 cin >> m;

 if (m < 1 || m > (MAX - 1))
 {
  cout << "\n" << m << " is out of the specified range. ";
  m = (m % (MAX - 1)) + 1;
  cout << "Using " << m << " instead.\n";
 }

 for (int j = 0; j < MAX; j++)
 {
  for (int i = 0; i < MAX; i++)
  {
   if (i == 0 || i == j)
    matrix[j][i] = Rational(1,1);
  }
 }

 if (m > 7)
 {
  cout << "\nFor m > 7 text output is recommended. Output results\nto"
   << " \"Bernoulli.txt\" [y/n] ";
  cin >> response;
  if ((response == 'y') || (response == 'Y'))
  {
   header(fout, m);
   body(fout, m, matrix);
   cout << "\nOutput complete.\n\n";
  }
  else
  {
   cout << "\nScreen output may be distorted! Continue output to "
    << "screen? [y/n] ";
   cin >> response;
   if ((response == 'y') || (response == 'Y'))
   {
    header(cout, m);
    body(cout, m, matrix);
   }
   else
   {
    header(fout, m);
    body(fout, m, matrix);
    cout << "\nOutput complete.\n\n";
   }
  }
 }
 else
 {
  header(cout, m);
  body(cout, m, matrix);
 }

 return 0;

Quote:
}

Rational::Rational(void)
{
 Num = 0;
 Denom = 1;

Quote:
}

Rational::Rational(long n)
{
 Num = n;
 Denom = 1;

Quote:
}

Rational::Rational(long n, long d)
{

 long g;

 Num = n;
 Denom = d;

 if (((Num < 0) && (Denom < 0)) || ((Num >= 0) && (Denom < 0)))
 {
  Num = -Num;
  Denom = -Denom;
 }

 g = gcd(Num, Denom);
 Num = Num / g;
 Denom = Denom / g;

Quote:
}

int Rational::invalid()
{
 return Denom == 0;

Quote:
}

long Rational::gcd(long a, long b)
{
 long r = (a < 0) ? -a : a;
 long g = b;
 long d;

 while(r != 0)
 {
  d = g;
  g = r;
  r = d % g;
 }

 return g;

Quote:
}

Rational operator - (const Rational a)
{
 return Rational(-a.Num, a.Denom);

Quote:
}

Rational operator + (const Rational a, const Rational b)
{
 return Rational(a.Num * b.Denom + b.Num * a.Denom, a.Denom * b.Denom);

Quote:
}

Rational operator - (const Rational a, const Rational b)
{
 return Rational(a.Num * b.Denom + -b.Num * a.Denom, a.Denom * b.Denom);

Quote:
}

Rational operator * (const Rational a, const Rational b)
{
 return Rational(a.Num * b.Num, a.Denom * b.Denom);

Quote:
}

int operator == (const Rational &a, const Rational &b)
{
 return ((a.Num == b.Num) && (a.Denom == b.Denom));

Quote:
}

istream &operator >> (istream &in, Rational &r)
{
 char slash;

 in >> r.Num >> slash >> r.Denom;

 return in;

Quote:
}

ostream &operator << (ostream &out, Rational &r)
{
 if (r.Denom == 1)
  out << r.Num;
 else
  out << r.Num << "/" << r.Denom;

 return out;

Quote:
}

int header(ostream &out, int x)
{
 out << "\nTable of values of B(j,k) for 0 <= k <= " << x <<":\n\n";
 out << "  j =\t";

 for (int i = 0; i <= x; i++)
  out << i + 1 << "\t";

 out << "\n\n";

 return 0;

Quote:
}

int body(ostream &out, int x, Rational m[][MAX])
{
 out << "k = ";
 for (int j = 0; j<= x; j++)
 {
  if (j == 0)
   out << j << "\t";
  else
   out << "    " << j << "\t";

  for (int i = 0; i <= x; i++)
  {
   if (m[j][i] == Rational(0,0))
    out << "   ";
   else
    out << m[j][i] << "\t";
  }
  out << "\n\n";
 }

 return 0;

Quote:
}



Fri, 25 Apr 2003 03:00:00 GMT  
 VC++ 6.0 SP4 Fatal Compiler Error C1001
It compiles just fine on my machine, in debug and release
builds.

Don't forget to try putting it into a fresh project - it is
possible that your problem is related to your project
configuration.

Quote:

> Hello Bruce,

> Thanks for your response. I believe the "constant" to which you refer
> belonged to a comment on the previous line of code. It was likely a result
> of the nested message formatting process, presumably by your e-mail client.
> I have recently been instructed to submit my work in a single file, the
> contents of which I have pasted at the end of this message (without
> comments) which, regrettably, still returns the fatal compiler error. I
> would be most curious to see if the code compiles on your machine. Thus I
> would suspect my installation of SP4, as another commentor has suggested.

> Thanks again,

> Bill



> In bernoulli.cpp, near the top, you have the following:
> constant
> int header(ostream &out, int x);                  // Output header function
> Constant is not a C++ keyword. You could change it to const, but that
> would be wrong to because you don't want to mark the return value of
> header() as const. Delete the word constant.
> With that done your code compiles and links for me. I'm using VC++
> 6.0 SP 4 on Windows 2000.
> If it still doesn't work for you, paste those three files into a new project
> to see if that works. If it does, then find out what is different between
> the
> two project's settings. If it doesn't work - I don't know.
> Note: I have sometimes found that service packs applied from the network
> do not get reliably applied. Your mileage may vary.
> If you are going to disable C++ exception  handling, use #pragma warning()
> to disable the warnings - just a suggestion.
> [SNIP - original code]

> .Bruce Dawson, Humongous Entertainment (we're hiring).
> http://www.humongous.com/
> Send job applications by e-mail, post technical questions
> to the newsgroups please. Thanks.

> #include <iostream>
> #include <fstream>

> using namespace std;

> class Rational
> {
> public:
>  Rational(void);
>  Rational(long);
>  Rational(long, long);
>  int invalid();
>  long gcd(long, long);
>  friend Rational operator - (const Rational);
>  friend Rational operator + (const Rational, const Rational);
>  friend Rational operator - (const Rational, const Rational);
>  friend Rational operator * (const Rational, const Rational);
>  friend int operator == (const Rational &a, const Rational &b);
>  friend istream &operator >> (istream &in, Rational &r);
>  friend ostream &operator << (ostream &out, Rational &r);
> private:
>  long Num;
>  long Denom;
> };

> const int MAX = 16;
> int header(ostream &out, int x);
> int body(ostream &out, int x, Rational m[][MAX]);

> int main()
> {
>  char response = 'y';
>  int m = 0;
>  ofstream fout("Bernoulli.txt", ios::out);
>  Rational matrix[MAX][MAX];

>  cout << "This program will compute all the Bernoulli coefficients\n"
>   << "B(j,k) for k <= m for any given m from 1 to " << MAX - 1
>   << ".\n\nPlease enter an m value from 1 to " << MAX - 1 << ": ";
>  cin >> m;

>  if (m < 1 || m > (MAX - 1))
>  {
>   cout << "\n" << m << " is out of the specified range. ";
>   m = (m % (MAX - 1)) + 1;
>   cout << "Using " << m << " instead.\n";
>  }

>  for (int j = 0; j < MAX; j++)
>  {
>   for (int i = 0; i < MAX; i++)
>   {
>    if (i == 0 || i == j)
>     matrix[j][i] = Rational(1,1);
>   }
>  }

>  if (m > 7)
>  {
>   cout << "\nFor m > 7 text output is recommended. Output results\nto"
>    << " \"Bernoulli.txt\" [y/n] ";
>   cin >> response;
>   if ((response == 'y') || (response == 'Y'))
>   {
>    header(fout, m);
>    body(fout, m, matrix);
>    cout << "\nOutput complete.\n\n";
>   }
>   else
>   {
>    cout << "\nScreen output may be distorted! Continue output to "
>     << "screen? [y/n] ";
>    cin >> response;
>    if ((response == 'y') || (response == 'Y'))
>    {
>     header(cout, m);
>     body(cout, m, matrix);
>    }
>    else
>    {
>     header(fout, m);
>     body(fout, m, matrix);
>     cout << "\nOutput complete.\n\n";
>    }
>   }
>  }
>  else
>  {
>   header(cout, m);
>   body(cout, m, matrix);
>  }

>  return 0;
> }

> Rational::Rational(void)
> {
>  Num = 0;
>  Denom = 1;
> }

> Rational::Rational(long n)
> {
>  Num = n;
>  Denom = 1;
> }

> Rational::Rational(long n, long d)
> {

>  long g;

>  Num = n;
>  Denom = d;

>  if (((Num < 0) && (Denom < 0)) || ((Num >= 0) && (Denom < 0)))
>  {
>   Num = -Num;
>   Denom = -Denom;
>  }

>  g = gcd(Num, Denom);
>  Num = Num / g;
>  Denom = Denom / g;
> }

> int Rational::invalid()
> {
>  return Denom == 0;
> }

> long Rational::gcd(long a, long b)
> {
>  long r = (a < 0) ? -a : a;
>  long g = b;
>  long d;

>  while(r != 0)
>  {
>   d = g;
>   g = r;
>   r = d % g;
>  }

>  return g;
> }

> Rational operator - (const Rational a)
> {
>  return Rational(-a.Num, a.Denom);
> }

> Rational operator + (const Rational a, const Rational b)
> {
>  return Rational(a.Num * b.Denom + b.Num * a.Denom, a.Denom * b.Denom);
> }

> Rational operator - (const Rational a, const Rational b)
> {
>  return Rational(a.Num * b.Denom + -b.Num * a.Denom, a.Denom * b.Denom);
> }

> Rational operator * (const Rational a, const Rational b)
> {
>  return Rational(a.Num * b.Num, a.Denom * b.Denom);
> }

> int operator == (const Rational &a, const Rational &b)
> {
>  return ((a.Num == b.Num) && (a.Denom == b.Denom));
> }

> istream &operator >> (istream &in, Rational &r)
> {
>  char slash;

>  in >> r.Num >> slash >> r.Denom;

>  return in;
> }

> ostream &operator << (ostream &out, Rational &r)
> {
>  if (r.Denom == 1)
>   out << r.Num;
>  else
>   out << r.Num << "/" << r.Denom;

>  return out;
> }

> int header(ostream &out, int x)
> {
>  out << "\nTable of values of B(j,k) for 0 <= k <= " << x <<":\n\n";
>  out << "  j =\t";

>  for (int i = 0; i <= x; i++)
>   out << i + 1 << "\t";

>  out << "\n\n";

>  return 0;
> }

> int body(ostream &out, int x, Rational m[][MAX])
> {
>  out << "k = ";
>  for (int j = 0; j<= x; j++)
>  {
>   if (j == 0)
>    out << j << "\t";
>   else
>    out << "    " << j << "\t";

>   for (int i = 0; i <= x; i++)
>   {
>    if (m[j][i] == Rational(0,0))
>     out << "   ";
>    else
>     out << m[j][i] << "\t";
>   }
>   out << "\n\n";
>  }

>  return 0;
> }

--
.Bruce Dawson, Humongous Entertainment (we're hiring).
http://www.humongous.com/
Send job applications by e-mail, post technical questions
to the newsgroups please. Thanks.


Fri, 25 Apr 2003 03:00:00 GMT  
 VC++ 6.0 SP4 Fatal Compiler Error C1001
Thanks for you assistance, Bruce!

Although it had been some time since I last used it, I ftp'ed the code over
to my Unix account and compiled it with g++ and everything worked fine with
the exception of a quick divide by zero fix. I guess if I used the GNU
compiler more it might grow on me but right now (and for good reason as
you've seen!) I'm {*filter*}ed to VC++'s de{*filter*}. I suppose it is safer using
the school's Unix-based compiler as one never knows which (if any) SP the
grader might have installed.

Thanks,

Bill


Quote:
> It compiles just fine on my machine, in debug and release
> builds.

> Don't forget to try putting it into a fresh project - it is
> possible that your problem is related to your project
> configuration.


> > Hello Bruce,

> > Thanks for your response. I believe the "constant" to which you refer
> > belonged to a comment on the previous line of code. It was likely a
result
> > of the nested message formatting process, presumably by your e-mail
client.
> > I have recently been instructed to submit my work in a single file, the
> > contents of which I have pasted at the end of this message (without
> > comments) which, regrettably, still returns the fatal compiler error. I
> > would be most curious to see if the code compiles on your machine. Thus
I
> > would suspect my installation of SP4, as another commentor has
suggested.

> > Thanks again,

> > Bill



Sat, 26 Apr 2003 15:34:45 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. C1001 - Internal Compiler Error When Using Templates In VC++ 6.0 SP4

2. fatal error C1001: INTERNAL COMPILER ERROR

3. fatal error C1001: INTERNAL COMPILER ERROR

4. fatal error C1001: INTERNAL COMPILER ERROR

5. fatal error C1001: INTERNAL COMPILER ERROR

6. fatal error C1001: INTERNAL COMPILER ERROR

7. fatal error C1001: INTERNAL COMPILER ERROR

8. fatal error C1001: INTERNAL COMPILER ERROR

9. fatal error C1001: INTERNAL COMPILER ERROR

10. fatal error C1001: INTERNAL COMPILER ERROR

11. fatal error C1001: INTERNAL COMPILER ERROR

12. fatal error C1001: INTERNAL COMPILER ERROR

 

 
Powered by phpBB® Forum Software