I am halfway through writing a program to calculate training times, and best exp to health ratios for any game which I can use it in but i have run into an error.

I am having a problem loading a form from when a menustrip item is clicked in Visual C++ 2008.

I am using this to load a new form:

DoubleMonsters^ form = gcnew DoubleMonsters();
 form->Show();

However it constantly returns an undeclared identifier error

I have included the form header to load from by:

#include "DoubleMonsters.h"

but I still can't get the program to work.

Any help with this problem is welcomed and thank you for your time

So, just to clarify, the compiler indicates that DoubleMonsters is not declared?
Can you post the class definition for DoubleMonsters?

So, just to clarify, the compiler indicates that DoubleMonsters is not declared?
Can you post the class definition for DoubleMonsters?

Yes, the compiler indicates that DoubleMonsters is not declared.

Here is the class definition for DoubleMonsters:

namespace TricksterCalculator {

	/// <summary>
	/// Summary for DoubleMonsters
	///
	/// WARNING: If you change the name of this class, you will need to change the
	///          'Resource File Name' property for the managed resource compiler tool
	///          associated with all .resx files this class depends on.  Otherwise,
	///          the designers will not be able to interact properly with localized
	///          resources associated with this form.
	/// </summary>
	public ref class DoubleMonsters : public System::Windows::Forms::Form
	{
	public:
		DoubleMonsters(void)
		{
			InitializeComponent();
			//
			//TODO: Add the constructor code here
			//
		}

Thanks for the help.

Did you add

using namespace TricksterCalculator;

to your cpp file?

Did you add

using namespace TricksterCalculator;

to your cpp file?

Yeah I did but it still doesn't work. However i found if I make another form and copy the code over then I stop getting identifier errors.

So i think I will just start again because I am going to redo the whole design anyway and i can just reuses the code I have already written.

Thanks for your help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.