我在Visual C++ 2010編程。我有一個example.h example.cpp和Form1.h。基本上,我粘貼了一些代碼。我不能在example.h文件中包含Form1.h,不知道爲什麼。但主要問題是如何從example.cpp中調用Test(它位於form1.h中)?語法是什麼?是否有可能做到這一點?在Visual C++ 2010中調用函數頭
我Form1.h
#include "example.h"
public ref class Form1 : public System::Windows::Forms::Form
{
public: void Test(void)
{
// Does something
}
}
我example.cpp
#include "example.h"
#include "Form1.h"
Test(); // would like to call Test from here.