Pattern recognition with neural networks in C++