Moved header's includes into separete header file.

This commit is contained in:
2023-08-02 23:01:19 +03:00
parent 7edca0b5e6
commit 7669dff7a6
9 changed files with 25 additions and 10 deletions

View File

@@ -1,8 +1,6 @@
// CGame.cpp
//
#include "CGame.h"
#include "CUserInput.h"
#include <random>
void CGame::Init()
{
@@ -43,7 +41,11 @@ void CGame::Start()
do
{
PrintGameHeader();
#ifdef _DEBUG
ShowGuessedNumber(true);
#else
ShowGuessedNumber(false);
#endif // DEBUG
PrintSteps();
ret = GetNumber(step);
switch (ret)

View File

@@ -1,7 +1,7 @@
// CGame.h
//
#pragma once
#include "defines.h"
#include "headers.h"
#include "CUserInput.h"
#include "CStep.h"

View File

@@ -1,7 +1,7 @@
// CStep.h
//
#pragma once
#include <vector>
#include "headers.h"
class CStep
{

View File

@@ -1,11 +1,7 @@
// CUserInput.h
//
#pragma once
#include "defines.h"
#include <iostream>
#include <string>
#include <vector>
#include <cwctype>
#include "headers.h"
class CUserInput
{

View File

@@ -142,6 +142,7 @@
<ClInclude Include="CStep.h" />
<ClInclude Include="CUserInput.h" />
<ClInclude Include="defines.h" />
<ClInclude Include="headers.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

View File

@@ -47,5 +47,8 @@
<ClInclude Include="defines.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="headers.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@@ -1,6 +1,6 @@
// bulls-and-cows.cpp
//
#include <Windows.h>
#include "headers.h"
#include "..\..\..\MyFunctions\SetUserLocale.h"
#include "CGame.h"

View File

@@ -1,3 +1,5 @@
// defines.h
//
#pragma once
#define VERSION 0.3

View File

@@ -0,0 +1,11 @@
// headers.h
//
#pragma once
#include <Windows.h>
#include <iostream>
#include <random>
#include <string>
#include <vector>
#include <cwctype>
#include "defines.h"