There is a logic class

#pragma once namespace tetstst { public ref class logic { private: char* name; public: logic(); int score; void setScore(int score); int getScore() { return score; }; void setName(char*); char* getName() { return name; }; ~logic(); }; } 

In the Source class, two logic objects are created.

 #pragma once #include "logic.h" namespace tetstst { public ref class Sourse{ public: Sourse(); logic player1; logic player2; }; } 

The dialog box should display the score selected player. How can I ask, whose value to take when output? Those. selecting player1 should display the value of player1 , in case player2 is player2 value of player2 should be displayed in the same window.

Now I display the value using

 textBox1->Text = sourse->player1.getScore().ToString(); 

but how to remake it on the choice of the current player?

  • Is this some kind of CLI? No ref in normal pros. - αλεχολυτ
  • I plan to expand the number of players, and for each new player to register my if is a bad option. - Vitali
  • This is the question. How to display the points of the selected player in the window? Create a function of type setActivePlayer, in which I pass an object, and access it? How does this look visually? - Vitali

0