I'm working on a small project using Visual Studio 2017. Basically I'm taking a small console based Banking Software program and porting it to a GUI based windows application.

I'm having issues getting access to certain variables from within a private function.
EX: MyForm.h has the following code:

class account
    int acno;
    char acno2;
    char name[50];
    int deposit;
    char type;
    void create_account();
    void show_account() const;
    void modify();
    void dep(int);
    void draw(int);
    void report() const;
    int retacno() const;
    int retdeposit() const;
    char rettype() const;

Now, I have a second form, NewAcctForm.h which has the following code:

    private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
        String ^ tempVar1 = textboxFirstName->Text;
        String ^ tempVar2 = textboxLastName->Text;
        String ^ tempVar3 = textboxAcctNum->Text;

        System::Console::WriteLine("\nFirst Name : " + tempVar1);
        System::Console::WriteLine("\nLast Name  : " + textboxLastName->Text);
        System::Console::WriteLine("\nAccount No : " + textboxAcctNum->Text);


Basically, what I'm trying to do is get the account number from textboxAcctNum and pass it to the class account so that it can be used. However, I'm having issues getting access to the class variables from within the private function for the button click.

I've looked at dozens of examples, but none of them are similar, and most of them are just using a single .h or .cpp file and everything is still using cout << and cin >>.

Could someone please help me understand how to get this portion working so I can pass variable values back and forth?