C++ error: no match for 'operator>>' in 'input >> Group1->Entrepreneur::Item'|

后端 未结 1 1199
南旧
南旧 2021-01-27 15:52

I\'m getting this error and have searched for a good 4-6 hour to try and get a solution but none of my searches yielded any results in my particular situation so here is my main

相关标签:
1条回答
  • 2021-01-27 16:27

    You are trying to read into a const object

    istream &operator>>(istream  &input, const Entrepreneur & Group1)
    

    This is why your

    input >> Group1.Item >> Group1.Donation >> Group1.Nr >> Group1.StartUpAmt;
    

    does not compile. Get rid of the const in the parameter declaration.

    An unrelated issue

    Points + 2;
    

    This is no-op statement.

    0 讨论(0)
提交回复
热议问题