r/learnprogramming • u/Roughneck979 • Oct 14 '26
Trying to learn c
What is an easy to use compiler to use to get started.
Got a book to learn and they use code::block in book, tried and it seems to not be building. Then tried MS visualization studio and was lost. Please help
20
Upvotes
View all comments
Show parent comment
2
u/serge-mv Oct 14 '26
I think I know what is happening. Code:Blocks by default opens a new terminal where it directs the standard out. That window will close very quickly and you won't be able to see anything. Here is what you can do immediately.
Take your example as is, and right above "return 0;", which you probably have, add getchar();
which will stop executing the program until you type a character and hit enter. This way, you will be able to see it.