It might be a bug in the old version, that's why i suggested that you update to 16.01.
I program in C, but let's dive into this, i just tried to replicate your problem in the new version but it doesn't seem to have any problems.
Maybe the class template have some typos, can you take a screenshot of your class box settings when you press new > class
I don't know where the template is, but if there's one it might be in /usr/share/codeblocks
Edit: Removed non-English content.