Are you running as a limited user? Can you try running Code::Blocks as an admin or otherwise elevated user? Does the folder "C:\CPP\" exist? Can you change the output path of the IDE to a folder you know you have write permissions to (EDIT: As an example you 'My Documents' folder)?
i've created a specific folder called CPP just to put all my C++ programs in it. and i tried to run code::blocks in admin, same error occurs. but the thing is that if i copy and paste the code into another project, it works well.