I'm having difficulties placing a class into a separate file and calling it in the main
. Below is my simple code.
Wondering how i can use the getKey()
function into the int main()
#include "stdafx.h"
#include <iostream>
#include <string>
#include "TravelFunctions.h"
using namespace std;
TravelFunctions::getKey()
{
cout << "i am a bananna" << endl;
}
my TravelFunction.h
class
class TravelFunctions
{
public:
getKey();
}
my main class
#include "stdafx.h"
#include <iostream>
#include <string>
#include "TravelFunctions.h"
using namespace std;
int main()
{
getKey bo;
return 0;
}