After compilation this simple example code, I have irritating error... I don't know what's going on, can anybody help me to solve that?
File Form1.h
Code:
#ifndef __FORM1_H__
#define __FORM1_H__
#include "TClass.h"
namespace testmycpp
{
public ref class Form1
{
public:
Form1(void);
private:
TClass ^m_tc; //this declaracion cause error
};
}
#endif
File Form1.cpp
Code:
#include "stdafx.h"
#include "Form1.h"
using namespace testmycpp;
Form1::Form1()
{
}
File TClass.h
Code:
#ifndef __TCLASS_H__
#define __TCLASS_H__
namespace testmycpp
{
public ref class TClass
{
public:
TClass(void);
};
}
#endif
File TClass.cpp
Code:
#include "stdafx.h"
#include "TClass.h"
using namespace testmycpp;
TClass::TClass()
{
}
File stdafx.h
COMPILER ERROR !!
Error 1 error C2143: syntax error : missing ';' before '^'
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum