Perhaps it is complaining about Show
and not reg
? Go to definition on RegisterForm
and make sure it has a Show
method that accepts no arguments. Also make sure this is the only error in your code. If there are other errors then resolve them first.
i have a c2065 undeclared identifier error although i declared it

hend naged
1
Reputation point
include "RegisterForm.h"
using namespace CppWinFormApp4; //name of project
.
.
.
.
.
private: System::Void button4_Click(System::Object^ sender, System::EventArgs^ e) {
RegisterForm ^ reg = gcnew RegisterForm;
reg->Show();
}
When I do that I get error c2065 saying i have an undeclared identifier
1 answer
Sort by: Most helpful
-
Michael Taylor 41,551 Reputation points
2022-04-12T19:01:11.017+00:00