I/we can get your previous code to compile just fine using the exact instructions that had been given previously. I even went out of my way to download and install Code::Blocks to test it out so I can show you that it is not a Code::Blocks issue.
Your biggest issue though is that you're just not ready for this. I am pretty sure every programmer at some point has been there before. Bit off more then they can chew. I have done it multiple times and it hurt me. Just take your time learning the language. Every single feature you learn in the language make some VERY simple projects using those features to test it out. The more you code on your own the more you will understand what exactly the code is doing before you even run it. When you need help understanding something we will gladly help you and give you some ideas. We aren't going to write your code for you and you telling us "I just want a premade solution that I can just plug into my code" will get you people that don't want to help you.
The fact you copied and pasted this code and expected it to work is a red flag to us. You can't do that. Could you tell us what what your code is doing actually right now? You don't need it to compile for you to get a good idea on what will happen. Just follow your code line by line.
We do want to help you as this is what this community is for. Though we aren't just going to give you all the answers to your program and write all your code for you. Again we see you tried to include a .cpp file, that was a huge red flag for us even more to see that you aren't ready for this.
here is a quick lesson in working with multiple files.
Lets say you have the following class:
What should we do with this class? We should put it in a header file. Though if we just did that and started including it with no include guards then we would be in trouble. We would be getting compiler errors galore! So what do we do to stop that? We use include guards
// The first thing you need to do in header files is use include guards
#ifndef FOO_H_ // It's just common to name it like this. it doesn't HAVE to be like that
#define FOO_H_ // make sure you do use the same name though for no own.
// Ok, now after your class and code that belongs in a header file you need a #endif
#endif //Your header file now has include guards Include this header file when you need to use it.
Lets say you want to write the implementation details for the Foo Class. You need to do that in it's separate .cpp file (also called source files). First is first, you include the Foo.h header file then implement your class. You do not use include guards .cpp files. Only in header files.
Now you're ready to use this anywhere. When ever you need to use the Foo class you would just include Foo.h. That easy.
Just slow down what you want to do and start from the basics to learn the language. Sadly we can't go out and make the next biggest game without knowing how to use the language.
Again, we want to help you, but we can't just give your all your code nor can you expect to just find your code online and use it that way.