#Concept #Study #CPP Compiling in C++ is taking your written code/files and maps it to machine readable instructions. When the compilation was successfull it outputs either an `.exe` file (Windows) or an executable file (MacOS/Linux) ## Errors ### Syntax errors describes any errors that occur when the code itself is wrongly structured, e.g. a missing `;`. ```c++ // Example std::cout << "Errors" << std::endl // returns a Syntax error ``` ### Semantic errors Occur when something went wrong with the logic/meaning of the code, for example if you want to do math operations on a string. ```c++ // Example a / 125; // Returns a Semantic errors ``` ## Warnings The compiler is returning a warning when recognizing an issue with your code but is still able to produce machine code from it. An example for a warning is when a variable is used, but was not initialized before or if a variable is initialized but never used. ```c++ // Example for uninitialized variable, compiler will throw a warning int miles_driven; std::cout << miles_driven; // warning: 'miles_driven' is used uninitialized .. ``` ## 🔗Resources