Is it any difference writing the whole code of your own functions before the main?
How can I edit my code on this site properly?
My code is the following:
#include "stdafx.h";
#include <iostream>;
#include <string>;
using namespace std;
//Introduce the game
void PrintIntro() {
constexpr int W_LENG = 5;
cout << "Welcome to the Cows and Bulls game\n";
cout << "You must get my guess word that is an isogram and it's long " << W_LENG <<" letters\n";
cout << "An isogram is a word in which every letter appears only one time\n";
cout << "Let's start the game\n";
return;
}
//Execute the game
int main()
{
PrintIntro();
string Guess=" ";
while (Guess!="**")
{
cout << "-----------------\nWrite a word: ";
getline(cin,Guess);
cout << "You typed: " << Guess << endl;
}
cout << "I'm ending the program...\n";
return 0;
}