Q:

how to define a class using c++

I need to define a class to hold stock data in c++. At minimum it needs a method for "meanvalue", a method for "vairance", and properties for "trading volume" and other historical data.

A:

Here's a start:
class Stock
{
public:
    Stock();
    ~Stock();

    int MeanValue();
    int Variance();

private:
    int mMeanValue;
    int mVariance;
};

I'll leave the implementation of the methods in this class up to you.

