#include<iostream>
#include "Guess the no.cpp"
usingnamespace std;
int main()
{
int game;
cout<<"Welcome to games"<<endl<<endl;
cout<<"Choose the game you want to play"<<endl<<"1. Guess the no"<<endl<<"2. Race";
cin>>game;
switch(game)
{
case 1:
GuessNo();
break;
case 2:
cout<<"Under development";
break;
default:
cout<<"Invalid game";
}
}
Don't #include .cpp files.
Instead make a header file which would contain just the function prototype declaration, void GuessNo(); and include that header file instead.