I do the laboratory for inheritance and polymorphism, the essence is this: a monitor and a mouse are connected to the PC. It is necessary to check the compatibility of drivers. I created a separate Windows Form that loads class objects into a vector that will iterate over the System Blocks. The problem occurred when I tried to label text to assign the name of the string variable from the object.

 label5->Text = Comps[number_of_SB].getMouseName; 

enter image description here

Function that returns the name of the mouse:

 string System_Block::getMouseName() { return Mous.get_name(); } 

What is the problem?

    1 answer 1

     label5->Text = Comps[number_of_SB].getMouseName(); ^^^^ 

    Functions with no arguments are still called using parentheses.