0
我保證我搜索的解決方案的高和低。你是我的最後一招。
我收到錯誤C3861錯誤(我真的嘗試過)
錯誤6錯誤C3861: 'saveSessionLurch':標識符找不到420 1 cs482newUI
這裏是我的XMLExport.h
#ifndef XMLEXPORT_H_
#define XMLEXPORT_H_
#include <vcclr.h>
#include <string>
using namespace std;
class XMLExport{
public:
void saveSessionLurch();
XMLExport();
};//end class XMLExport
#endif
驗證碼是我的XMLExport.cpp代碼:
#include "StdAfx.h"
#include "XMLExport.h"
void XMLExport::saveSessionLurch(){
}//end SaveSessionLurch
這最終會做些什麼,但我只是試圖讓它現在編譯。
這裏是Form1.h的代碼。我實際上刪除了大部分與此問題無關的代碼。
這是代碼的頂部:
#pragma once
#include "Cell.h"
#include "Session.h"
#include "systemObjectWrapper.h"
#include "XMLExport.h"
,這是其中所述錯誤發生。該SaveFileDialog打開了,所以我知道了點擊工作:
private: System::Void saveSessionButton_Click(System::Object^ sender,System::EventArgs^ e){
SaveFileDialog^ saveFileDialog1 = gcnew SaveFileDialog;
saveFileDialog1->ShowDialog()
saveSessionLurch();//THIS IS WHERE THE ERROR IS
}
非常感謝你提前爲您的幫助。這將是很好的回報
我很尷尬......我不知道這意味着什麼。你能擴展一下嗎? – Luron 2011-04-18 17:54:47
您需要學習基本的面向對象編程,關於類,方法和實例。 – SLaks 2011-04-18 17:58:32
我知道這一切。我只是想確保我正確地理解你。你的意思是在form1.h中創建一個新的xmlExport實例,然後從該實例調用saveSessionLurch?如'this-> XMLExport = new XMLExport(); this-> XMLExport.saveSessionLurch();' – Luron 2011-04-18 18:05:17