This is the error i get
Unable to start program D:\c++\object\Debug\object.exe
The system canot find the file specified.
object is the name of the project..
Here is my code...
Thank you
#include <iostream>
using namespace std;
class tiger
{
public:
//tiger attributes
char color;
int legs;
char speed;
int stripes;
char size;
char personality;
char gender;
//constructor
tiger()
{
color = 'orange';
legs = 4;
speed = 'fast';
stripes = 5;
size = 'big';
personality = 'mean';
gender = 'male';
}
//define methods
//color
void setColor(char pColor)
{
color = pColor;
}
char getColor()
{
return color;
}
//legs
void setLegs(int pLegs)
{
legs = pLegs;
}
int getLegs()
{
return legs;
}
//speed
void setSpeed(char pSpeed)
{
speed = pSpeed;
}
char getSpeed()
{
return speed;
}
//stripes
void setStripes(int pStripes)
{
stripes = pStripes;
}
int getStripes()
{
return stripes;
}
//size
void setSize(char pSize)
{
size = pSize;
}
char getSize()
{
return size;
}
//personality
void setPersonality(char pPersonality)
{
personality = pPersonality;
}
char getPersonality()
{
return personality;
}
//gender
void setGender(char pGender)
{
gender = pGender;
}
char getGender()
{
return gender;
}
};
class fish
{
public:
//define attributes
char size;
int fins;
char texture;
char depth;
char color;
//constructor
fish()
{
size = 'small';
fins = 3;
texture = 'rough';
depth = 'deep water';
color = 'orange';
}
//size
void setSize(char pSize)
{
size = pSize;
}
char getSize()
{
return size;
}
//fins
void setFins(int pFins)
{
fins = pFins;
}
int getFins()
{
return fins;
}
//texture
void setTexture(char pTexture)
{
texture = pTexture;
}
char getTexture()
{
return texture:
}
//depth
void setDepth(char pDepth)
{
depth = pDepth;
}
char getDepth()
{
return depth;
}
//color
void setColor(char pColor)
{
color = pColor;
}
char getColor()
{
return color;
}
};
int main()
{
tiger liger;
tiger larry;
fish nemo;
fish squish;
cout << "Liger the tiger is" << liger.getColor() << endl;
larry.setColor('dark orange');
cout << "Larry the tiger is" << larry.getColor() << endl;
return 0;
}
It can't find the *.exe file because your code won't compile.
i think char in declaration