PLEASE HELP!! with strings, vectors.

...
Last edited on
You haven't defined the function "Stock::getPrice()", only declared it, so the linker can't find it. Also, you can't create an object of "nsadaq()" (with the parentheses), as that implies a dereferenced function. Try getting rid of the parantheses attached to "nsadaq" on lines 65-67.
...
Last edited on
...
Last edited on
Again, you are not defining those functions specified. Here is how I would define both of them:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Stock {
    public:
        double getPrice(void) const;
        // ...
    private:
        // ...
};

class Xchange : public Stock {
    public:
        Xchange() : Stock("", 0.0) {}  // Initialize to null values
        // ...
    private:
        // ...
};

double Stock::getPrice(void) const {
    return price;
}

Topic archived. No new replies allowed.