If you are able to build your cpp/c file but not able to run using codeblocks, then your system lacks the presence of MinGW. Download MinGW from sourceforge.net and after a restart you'll be able to run your c/cpp program.
The blog will contain all the Technical knowledge I have to share and I welcome & would appreciate others for sharing their knowledge :0)