Check what version of Mint you have:
cat /etc/debian_version
This should be Buster for the following to work. If you are on Stretch, please refer to: https://wxstuff.xaviou.fr/article/debian-repository.html
Import repository key:
wget -O- https://apt.xaviou.fr/key.asc | sudo apt-key add -
Create repository list:
sudo vi /etc/apt/sources.list.d/codeblocks.list
And insert following text:
deb https://apt.xaviou.fr/stable/ buster main deb-src https://apt.xaviou.fr/stable/ buster main
Update your installation
sudo apt-get update
Now you are ready to install Code::Blocks from the packet manager or from the command line.
sudo apt-get install codeblocks