// construct and destruct
#include <iostream>
using namespace std;
class clsFish
{
private:
int iSize1; // size for dynamic array
int * pLocC; // create int pointer look
// here is my code it keeps telling me that my that iSize2 is not declared. I am using Dev c++ and it keeps giving me errors and am wondering if any one can help me out. It would be greatly appreciated.
In your display function you try to use iSize2 but you don't pass iSize2 into the display function, you pass iSize2 into the constructor and assign iSize1 its value. Use iSize1 in the for loop in Display()