cpp:vector_overloading_binary_operators2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cpp:vector_overloading_binary_operators2 [2021/05/07 14:37] – gthanos | cpp:vector_overloading_binary_operators2 [Unknown date] (current) – external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 17: | Line 17: | ||
| | %%>> | | %%>> | ||
| - | <code cpp Vector.cpp> | + | <code cpp Vector.hpp> |
| #include < | #include < | ||
| #include < | #include < | ||
| #include < | #include < | ||
| using namespace std; | using namespace std; | ||
| + | |||
| + | #ifndef _VECTOR_HPP_ | ||
| + | #define _VECTOR_HPP_ | ||
| class Vector { | class Vector { | ||
| Line 60: | Line 63: | ||
| | | ||
| }; | }; | ||
| + | |||
| + | #endif | ||
| + | </ | ||
| + | |||
| + | <code cpp Vector.cpp> | ||
| + | #include " | ||
| Vector:: | Vector:: | ||
| Line 266: | Line 275: | ||
| return array[pos]; | return array[pos]; | ||
| } | } | ||
| + | </ | ||
| + | |||
| + | <code cpp VectorUsage.cpp> | ||
| + | #include " | ||
| int main() { | int main() { | ||
cpp/vector_overloading_binary_operators2.1620398260.txt.gz · Last modified: 2021/05/07 13:37 (external edit)
