I code in c++ for 40 years and fortunately I have found time to learn how assert and breakpoints work
From where should i know that you program for 40 years? In this forum are 90% beginners, so i do not expect anyone with this much experience here....
Still, you do not describe in detail what the problem is...
Can you make a step by step description?
1) Open codeblocks
2) Create new project
3) Paste the code from top
4) Hit compile and run
5) Console window pops up but closes immediately. I expect that it remains open...
for me step 1 to 5 work without problems, in step 5 the console stays open
1) Open codeblocks
2) Create new project
3) Paste code form the top
4) place a breakpoint in line 3
5) Hit debug
6) Program exits, but it should stop in line 3
Also this works for me for step 1 to 6. But on step 6 for me the debugger stops and whaits for next instruction
1) Open codeblocks
2) Create new project
3) Paste code from the top
4) Hit compile and run
5) close codeblocks
6) go to the project bin folder
7) Double click my program
Black window pops up for a short time. But i expect to read some assert text
Again steps 1-8 work for me and step 8 should be the black window poping up but closing fast
So what from this is not working for you?