From cbc7d9207a4c93cd70a642ecbce08f7c1c28edf0 Mon Sep 17 00:00:00 2001 From: Ryan Ho Date: Wed, 24 Apr 2024 21:42:54 -0400 Subject: [PATCH] C++ setup files and documentation --- tests/setup/README.md | 36 ++++++++++++++++++++++++++++++++++++ tests/setup/version | Bin 0 -> 51352 bytes tests/setup/version.cpp | 13 +++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 tests/setup/README.md create mode 100755 tests/setup/version create mode 100644 tests/setup/version.cpp diff --git a/tests/setup/README.md b/tests/setup/README.md new file mode 100644 index 0000000..585afbf --- /dev/null +++ b/tests/setup/README.md @@ -0,0 +1,36 @@ +# Running C++20 Code with GCC + +This guide outlines the steps to compile and run C++20 code using the GNU Compiler Collection (GCC). It is intended for those who want to work with modern C++ features. More specifcially, it is important that we use a consistent version of C++ throughout the entirety of this project to ensure consistency. + +Flag +```bash +-std=c++20 +``` +should be used on all g++ compilation commands. + +## Prerequisites +Before running C++20 code, ensure you have the following: +- GCC installed (Version 10 or later for C++20 support) +- Basic understanding of C++ programming +- A terminal or command-line environment + +## Compiling C++20 Code +To compile a C++20 program, use the following command in your terminal or command line: + +```bash +g++ -std=c++20 -o +``` + +## Example +Here's an example to compile a C++20 program, main.cpp, into an executable called my_program: + +```bash +g++ -std=c++20 main.cpp -o my_program +``` + +## Running the program +To run the compiled executable, use the following command: +```bash +./my_program +``` +This will execute the compiled code and display the output in your terminal or command-line environment. \ No newline at end of file diff --git a/tests/setup/version b/tests/setup/version new file mode 100755 index 0000000000000000000000000000000000000000..52ea14a0a3f9d50275dd0289978b8782a05b874a GIT binary patch literal 51352 zcmeHw4|r77weLPN0VW8F5GBM|cuB5Z}pR8;@m4Jv&J{r*V+Nwph_RF%q&wfrY9){DDhVx}zj|JDn7$9@f zt3AW$Oza$^3}Nb*^~(?~)-eurJsMlJJZhbC(%XNLL9c~7Nm!-lVS13E{ONjqAfN}= z1cJ>mJ?3BTq&KJBpjXQD2&?ogMl5=Prp9Qz!%liF7aR1l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gc!^7+=P+IN3?L*)GLW>%g{4md(w7^D5o7w!Z$eS6;m5 znvLhpJJ9`B_N^};e{rMhf`{&Td)x1y9pQTPluadHz32HI_gwhOAL>IR?t1#XRi9jZ J#bq>D{|%ATvugkV literal 0 HcmV?d00001 diff --git a/tests/setup/version.cpp b/tests/setup/version.cpp new file mode 100644 index 0000000..9058769 --- /dev/null +++ b/tests/setup/version.cpp @@ -0,0 +1,13 @@ +#include +#include + +// test program to ensure successfull c++ 20 setup and gcc setup +int main() +{ + std::vector numbers = {1, 2, 3, 4, 5}; + for (int i = 0; i < numbers.size(); i++) + { + std::cout << numbers[i] << " "; + } + return 0; +}