Is anyone else see the bug here C++?

Member

kian

by kian , in category: C/C++ , 2 months ago

Is anyone else see the bug here C++?? 😘

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include <iostream>
#include <vector>

template <typename T>
struct Vec {
        T x, y;

	Vec& operator /=(const T& d) {
            x /= d;
            y /= d;
	    return *this;
	}
};


Facebook Twitter LinkedIn Telegram Whatsapp Pocket

no answers