From 9243fd9764740dd893b52b597a69ed11e271a929 Mon Sep 17 00:00:00 2001 From: Tibor Bizjak Date: Thu, 13 Jul 2023 15:40:20 +0200 Subject: [PATCH] udemy-cpp : added given partial solution to excercise 01 --- udemy-cpp/exc01/AdConstants.h | 14 ++++++++++++++ udemy-cpp/exc01/AdFunctions.cc | 6 ++++++ udemy-cpp/exc01/AdFunctions.h | 3 +++ udemy-cpp/exc01/AdTypes.h | 5 +++++ udemy-cpp/exc01/main.cc | 14 ++++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 udemy-cpp/exc01/AdConstants.h create mode 100644 udemy-cpp/exc01/AdFunctions.cc create mode 100644 udemy-cpp/exc01/AdFunctions.h create mode 100644 udemy-cpp/exc01/AdTypes.h create mode 100644 udemy-cpp/exc01/main.cc diff --git a/udemy-cpp/exc01/AdConstants.h b/udemy-cpp/exc01/AdConstants.h new file mode 100644 index 0000000..bf81707 --- /dev/null +++ b/udemy-cpp/exc01/AdConstants.h @@ -0,0 +1,14 @@ +#pragma once + +#include +#include + +namespace Ad +{ +namespace Constants +{ + +constexpr std::int32_t EGO_VEHICLE_ID = -1; + +} // namespace Constants +} // namespace Ad diff --git a/udemy-cpp/exc01/AdFunctions.cc b/udemy-cpp/exc01/AdFunctions.cc new file mode 100644 index 0000000..6bf3576 --- /dev/null +++ b/udemy-cpp/exc01/AdFunctions.cc @@ -0,0 +1,6 @@ +#include +#include +#include + +#include "AdConstants.h" +#include "AdFunctions.h" diff --git a/udemy-cpp/exc01/AdFunctions.h b/udemy-cpp/exc01/AdFunctions.h new file mode 100644 index 0000000..e1ff169 --- /dev/null +++ b/udemy-cpp/exc01/AdFunctions.h @@ -0,0 +1,3 @@ +#pragma once + +#include "AdTypes.h" diff --git a/udemy-cpp/exc01/AdTypes.h b/udemy-cpp/exc01/AdTypes.h new file mode 100644 index 0000000..7c13713 --- /dev/null +++ b/udemy-cpp/exc01/AdTypes.h @@ -0,0 +1,5 @@ +#pragma once + +#include + +#include "AdConstants.h" diff --git a/udemy-cpp/exc01/main.cc b/udemy-cpp/exc01/main.cc new file mode 100644 index 0000000..1064b92 --- /dev/null +++ b/udemy-cpp/exc01/main.cc @@ -0,0 +1,14 @@ +#include +#include +#include + +#include "AdFunctions.h" +#include "AdTypes.h" + +int main() +{ + auto ego_vehicle = Ad::Data::init_ego_vehicle(); + Ad::Visualize::print_vehicle(ego_vehicle); + + return 0; +}