I left out what is inside the loop because I get same segmentation fault even if I comment everything inside the loop.
Where did I make the mistake ? Thank you.
Kind regards, T
Yes, I understand you are not getting a crash, but I am :D
By the way I am using CodeBlocks on Win 7. And yesterday I've had problems with mkdir that I didn't see before, so maybe my configuration got messed up.
Thank you for suggestion. If I comment out the entire for loop, it gets to printing **BEFORE LOOP**. But if I leave the for loop there, it doesn't get to printing **BEFORE LOOP** - program crashes again.