uibk_703807-Advanced-CXX/exercises/task02/vec.cpp

24 lines
312 B
C++
Raw Normal View History

2020-10-06 12:34:06 +02:00
class Vec3 {
public:
Vec3() = default;
Vec3(int x, int y, int z) : x(x), y(y), z(z) {}
private:
int x = 0;
int y = 0;
int z = 0;
};
int main()
{
Vec3 v0;
Vec3 v1();
Vec3 v2(1, 2, 3);
Vec3 v3{1, 2, 3};
Vec3 v4 = {1, 2, 3};
auto v5 = Vec3{};
auto v6 = Vec3(1, 2, 3);
auto v7 = Vec3{1, 2, 3};
}