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?