88 page: test cursor
This commit is contained in:
@@ -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 \
|
||||
..
|
||||
|
||||
18
src/main.cpp
18
src/main.cpp
@@ -1,5 +1,23 @@
|
||||
#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() {
|
||||
testCuror();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user