diff --git a/build-x86.sh b/build-x86.sh index ca9b29c..4248b59 100755 --- a/build-x86.sh +++ b/build-x86.sh @@ -69,6 +69,8 @@ configure_cmake() { print_info "Тип сборки: $build_type" cmake \ + -DCMAKE_C_COMPILER=gcc-11 \ + -DCMAKE_CXX_COMPILER=g++-11 \ -DCMAKE_BUILD_TYPE="$build_type" \ -DCMAKE_VERBOSE_MAKEFILE=ON \ .. diff --git a/src/main.cpp b/src/main.cpp index 1ac82fd..8781f2f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,5 +1,23 @@ #include +void testCuror() { + int test[5] {11,22,33,44,55}; + int firstElWitoutCursor = test[0]; + int* firstElWithCursor = &test[0]; + + std::cout << "Initial state in RAM" << std::endl; + std::cout << test[0] << std::endl; + std::cout << firstElWitoutCursor << std::endl; + std::cout << *firstElWithCursor << std::endl; + ++firstElWitoutCursor; + --*firstElWithCursor; + std::cout << "After operations state in RAM" << std::endl; + std::cout << test[0] << std::endl; + std::cout << firstElWitoutCursor << std::endl; + std::cout << *firstElWithCursor << std::endl; +} + int main() { + testCuror(); return 0; } diff --git a/test b/test new file mode 100755 index 0000000..f148624 Binary files /dev/null and b/test differ