88 page: test cursor

This commit is contained in:
2026-03-30 22:09:14 +03:00
parent eeccbb8add
commit 1eba3da70d
3 changed files with 20 additions and 0 deletions

View File

@@ -69,6 +69,8 @@ configure_cmake() {
print_info "Тип сборки: $build_type" print_info "Тип сборки: $build_type"
cmake \ cmake \
-DCMAKE_C_COMPILER=gcc-11 \
-DCMAKE_CXX_COMPILER=g++-11 \
-DCMAKE_BUILD_TYPE="$build_type" \ -DCMAKE_BUILD_TYPE="$build_type" \
-DCMAKE_VERBOSE_MAKEFILE=ON \ -DCMAKE_VERBOSE_MAKEFILE=ON \
.. ..

View File

@@ -1,5 +1,23 @@
#include <iostream> #include <iostream>
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() { int main() {
testCuror();
return 0; return 0;
} }

BIN
test Executable file

Binary file not shown.