1) incorrect typecast: double p = 0.3333; int N = 50000, m=30000 int dn = (int)p*M-m; 2) signed - unsigned integer improper use: unsigned int X=45; double x = -Х*0.5; x == ???3) template misuse: class Base {} class Derived : public Base {}
std::vector<Base> v; Derived d; v.push_back(d); and the last one, my favorite: double p = 2/3; Happy coding!
I teach programming in Moscow State University, dept. of Phisics. Have some expertise in image recogntion and processing, Stochastic and Fuzzy algorithms, etc. Do some programming from time to time.