Guest_imported
New member
- Jan 1, 1970
- 0
#include "DENOM.H"
Denomination:enomination ( ) // default constructor
{
value=0;
count=0;
plural= NULL; // plural and sing are char pointers
sing= NULL;
}
Denomination:enomination ( int d, char * s, char *m ) // Initialization constructor
{
value=d;
count=0;
sing=new.char[strlen(s)+1];
strcpy(sing,s);
if (!m)
plural= NULL;
else
plural=new.char[strlen(m)+1];
strcpy(plural,m);
}
Denomination::~Denomination () // Destructor
{
if (sing)
delete[] sing;
if (plural)
delete[] plural;
}
void Denomination::change ( long & amount )
{
count=value/amount;
amount%=value
}
void Denomination:rint ()
{
if (count==1)
cout << count << sing;
else if (count>1)
cout << count << plural;
}
this is giving this error
a:\denom.h(2) : warning C4182: #include nesting level is 363 deep; possible infinite recursion
a:\denom.h(2) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
Error executing cl.exe.
please help this is due tomarrow!!!!!!!!!!!!!!
Denomination:enomination ( ) // default constructor
{
value=0;
count=0;
plural= NULL; // plural and sing are char pointers
sing= NULL;
}
Denomination:enomination ( int d, char * s, char *m ) // Initialization constructor
{
value=d;
count=0;
sing=new.char[strlen(s)+1];
strcpy(sing,s);
if (!m)
plural= NULL;
else
plural=new.char[strlen(m)+1];
strcpy(plural,m);
}
Denomination::~Denomination () // Destructor
{
if (sing)
delete[] sing;
if (plural)
delete[] plural;
}
void Denomination::change ( long & amount )
{
count=value/amount;
amount%=value
}
void Denomination:rint ()
{
if (count==1)
cout << count << sing;
else if (count>1)
cout << count << plural;
}
this is giving this error
a:\denom.h(2) : warning C4182: #include nesting level is 363 deep; possible infinite recursion
a:\denom.h(2) : fatal error C1076: compiler limit : internal heap limit reached; use /Zm to specify a higher limit
Error executing cl.exe.
please help this is due tomarrow!!!!!!!!!!!!!!