This is what i get when i use that after double clicking the button and putting my code in.
1>------ Build started: Project: Tester, Configuration: Debug Win32 ------
1> stdafx.cpp
1> AssemblyInfo.cpp
1> Form2.cpp
1> Tester.cpp
1>c:\users\admin\documents\visual studio 2010\projects\tester\tester\Form1.h(80): error C2065: 'Form2' : undeclared identifier
1>c:\users\admin\documents\visual studio 2010\projects\tester\tester\Form1.h(80): error C2065: 'f2' : undeclared identifier
1>c:\users\admin\documents\visual studio 2010\projects\tester\tester\Form1.h(80): error C2061: syntax error : identifier 'Form2'
1>c:\users\admin\documents\visual studio 2010\projects\tester\tester\Form1.h(81): error C2065: 'f2' : undeclared identifier
1>c:\users\admin\documents\visual studio 2010\projects\tester\tester\Form1.h(81): error C2227: left of '->show' must point to class/struct/union/generic type
1> type is ''unknown-type''
1> Generating Code...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Here is the code that im using as well.
1 2 3 4 5
|
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
Form2^ f2 = new Form2();
f2 -> show();
}
|
Am i doing the above correctly?
Also what do you mean by runtime or compile time, assuming it is what i think it is, it doesn't compile correctly.
Thanks :)