I have the following code:
#pragma once class Matrix{ public: Matrix(); ~Matrix(); protected: float mat[3] = {0.0, 0.0, 0.0}; };
but I get an error message float mat[3] = {0.0, 0.0, 0.0}; . It speaks of error C2059: syntax error: '{' and error C2334: unexpected token (s) preceding '{'; skipping the visible function body.
I am creating the array correctly, and I? What is the problem?
Danny source share