Class data members

I have

1
2
3
4
5
6
7
8
9
Class MediaClass
{
  public:
    void InputMedia();
    void DisplayMedia() const;
  private:
    int qty;
    string title;
}


I am using
1
2
3
4
5
6
7
int main()
{
  MediaClass m1;
  m1.InputMedia();
  m1.DisplayMedia();
  return 0;
}


to test it. When I access DisplayMedia() why aren't qty and title being output as what i typed in? They are outputting as blank for title and MAX for qty? Am i not calling correctly? To my understanding m1 carries the information over??

Thanks
Last edited on
what are the implementations of MediaClass::InputMedia and MediaClass::DisplayMedia?
There's probably a problem with how you're inputting them (from code, that is).
Topic archived. No new replies allowed.