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;

When I do that I get error c2065 saying i have an undeclared identifier

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,601 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Taylor 50,426 Reputation points

    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.

    0 comments No comments