Initial Course
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace pointers {
|
||||
|
||||
[[nodiscard]] auto allocate_and_fill(std::size_t count, int value) -> int*;
|
||||
void deallocate(int* ptr);
|
||||
[[nodiscard]] auto clone_array(const int* source, std::size_t count) -> int*;
|
||||
|
||||
} // namespace pointers
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace pointers {
|
||||
|
||||
[[nodiscard]] auto pointer_distance(const int* begin, const int* end) -> std::size_t;
|
||||
[[nodiscard]] auto find_pointer(const int* begin, const int* end, int target) -> const int*;
|
||||
auto reverse_in_place(int* begin, int* end) -> void;
|
||||
|
||||
} // namespace pointers
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace pointers {
|
||||
|
||||
[[nodiscard]] auto get_value(int* ptr) -> int;
|
||||
void set_value(int* ptr, int value);
|
||||
[[nodiscard]] auto is_null(const int* ptr) -> bool;
|
||||
void swap_via_pointers(int* a, int* b);
|
||||
|
||||
} // namespace pointers
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
namespace pointers {
|
||||
|
||||
[[nodiscard]] auto double_value(const int& value) -> int;
|
||||
void increment(int& value);
|
||||
[[nodiscard]] auto max_ref(const int& a, const int& b) -> const int&;
|
||||
[[nodiscard]] auto sum_three(const int& a, const int& b, const int& c) -> int;
|
||||
|
||||
} // namespace pointers
|
||||
Reference in New Issue
Block a user