Click here to Skip to main content
15,894,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Read excel *.xlsx Pin
David Crow22-Sep-09 2:55
David Crow22-Sep-09 2:55 
AnswerRe: Read excel *.xlsx Pin
MsmVc22-Sep-09 2:57
MsmVc22-Sep-09 2:57 
AnswerRe: Read excel *.xlsx Pin
Rajesh R Subramanian22-Sep-09 4:39
professionalRajesh R Subramanian22-Sep-09 4:39 
QuestionATL programming Pin
santhosh-padamatinti22-Sep-09 2:35
santhosh-padamatinti22-Sep-09 2:35 
AnswerRe: ATL programming Pin
CPallini22-Sep-09 2:38
mveCPallini22-Sep-09 2:38 
AnswerRe: ATL programming Pin
Rajesh R Subramanian22-Sep-09 4:35
professionalRajesh R Subramanian22-Sep-09 4:35 
Questionhow to set background color of menu and submenu in vc++ Pin
prerananit22-Sep-09 1:45
prerananit22-Sep-09 1:45 
AnswerRe: how to set background color of menu and submenu in vc++ Pin
Game-point22-Sep-09 2:00
Game-point22-Sep-09 2:00 
Questiondisplaying of context menu in richedittextbox control in vc++,mfc Pin
prerananit22-Sep-09 1:42
prerananit22-Sep-09 1:42 
AnswerRe: displaying of context menu in richedittextbox control in vc++,mfc Pin
Richard MacCutchan22-Sep-09 2:20
mveRichard MacCutchan22-Sep-09 2:20 
QuestionHow to call a method from soap base .net web service? Pin
bankey101022-Sep-09 1:23
bankey101022-Sep-09 1:23 
QuestionProblem with get/set method [modified] Pin
Sivyo22-Sep-09 0:16
Sivyo22-Sep-09 0:16 
AnswerRe: Problem with get/set method Pin
Nuri Ismail22-Sep-09 0:41
Nuri Ismail22-Sep-09 0:41 
GeneralRe: Problem with get/set method Pin
Sivyo22-Sep-09 1:33
Sivyo22-Sep-09 1:33 
GeneralRe: Problem with get/set method Pin
Nuri Ismail22-Sep-09 2:05
Nuri Ismail22-Sep-09 2:05 
GeneralRe: Problem with get/set method Pin
Sivyo22-Sep-09 2:17
Sivyo22-Sep-09 2:17 
GeneralRe: Problem with get/set method Pin
David Crow22-Sep-09 2:53
David Crow22-Sep-09 2:53 
GeneralRe: Problem with get/set method Pin
Sivyo22-Sep-09 9:45
Sivyo22-Sep-09 9:45 
AnswerRe: Problem with get/set method Pin
CPallini22-Sep-09 0:59
mveCPallini22-Sep-09 0:59 
GeneralRe: Problem with get/set method Pin
Sivyo22-Sep-09 1:39
Sivyo22-Sep-09 1:39 
QuestionRe: Problem with get/set method Pin
CPallini22-Sep-09 1:59
mveCPallini22-Sep-09 1:59 
AnswerRe: Problem with get/set method Pin
Sivyo22-Sep-09 2:05
Sivyo22-Sep-09 2:05 
GeneralRe: Problem with get/set method Pin
CPallini22-Sep-09 2:28
mveCPallini22-Sep-09 2:28 
Your code is working fine on my system, however I had to do the following modifications, in order to compile it:
Commented out few lines (I haven't all your animal classes Roll eyes | :rolleyes: ), hence
int main(int argc,char* argv[])
{
  Animals *ourAnimals[6];



  Animals *goldfish = new Goldfish();
  //Animals *crocodile = new Crocodiles();
  //Animals *elephant = new Elephants();
  //Animals *gazelles = new Gazelles();
  //Animals *shark = new Sharks();
  //Animals *snakes = new Snakes();


  ourAnimals[0]=goldfish;
  //ourAnimals[1]=crocodile;
  //ourAnimals[2]=elephant;
  //ourAnimals[3]=gazelles;
  //ourAnimals[4]=shark;
  //ourAnimals[5]=snakes;

  string name, gender, weight;

  name = "the Goldfish";
  gender = "Female";
  weight = "One Ounce";

  goldfish -> setName(name);
  goldfish -> setGender(gender);
  goldfish -> setWeight(weight);

}


Added the constructor and destructor for the Animals (misname? Wouldn't be better 'Animal'?) class:
class Animals
{
public:
  Animals(void){};
  virtual ~Animals(void){};
//...



Again and again: use the debugger and have a look at the call stack window.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Problem with get/set method Pin
Sivyo22-Sep-09 3:18
Sivyo22-Sep-09 3:18 
AnswerRe: Problem with get/set method Pin
Richard MacCutchan22-Sep-09 2:32
mveRichard MacCutchan22-Sep-09 2:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.