クラスを別のファイルに配置し、main
. 以下は私の簡単なコードです。
getKey()
関数をどのように使用できるか疑問に思っていますint main()
#include "stdafx.h"
#include <iostream>
#include <string>
#include "TravelFunctions.h"
using namespace std;
TravelFunctions::getKey()
{
cout << "i am a bananna" << endl;
}
私のTravelFunction.h
クラス
class TravelFunctions
{
public:
getKey();
}
私のメインクラス
#include "stdafx.h"
#include <iostream>
#include <string>
#include "TravelFunctions.h"
using namespace std;
int main()
{
getKey bo;
return 0;
}