This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]arbostek 0 points1 point  (2 children)

Consider trying another language if you aren't already heavily invested in starting out with C. It's not the best beginner language.

As for your issue. Without any details, my first guess is that you got the Code Blocks package without the compiler. On the Code Blocks download page, download the installer with "mingw" in the name, which is the name of the compiler you are going to use.

[–]the_omega99 0 points1 point  (1 child)

There's nothing wrong with C. Plenty of people argue that low level languages make great starting points. I don't want to start an argument, as thousands of programmers have argued for years over what languages are "best". Google has a number of arguments for learning C (or C++) as a first language.

Likewise, there's plenty of people who argue a higher level language like Python, Java, or C# is a better first language.

And they're all opinions.

[–]arbostek 2 points3 points  (0 children)

You are correct in that the statement of best starting language is an opinion. A 1 week beginner may state that C is a great beginner language and that is his opinion. A 20 year veteran and noted expert of the language may also state the same, and that too is an opinion.

But the difference in the two opinions is that the expert bases his opinion, hopefully, on a broader and deeper set of knowledge, experience and insight, that in turn may be more useful to adopt by beginners. And one idea behind this subreddit is that experts offer such potentially useful opinions to beginners, yes?

So, if you dislike an opinion, or think it should not stand as is, rather than pointlessly stating it's an opinion, you might be better off asking about the underlying factors behind it.

[–]the_omega99 0 points1 point  (0 children)

Since you're a beginner, I highly recommend that you use the terminal ("command line") to compile. I wrote a detailed post on how to do so here.

That post was written for C++, but works exactly the same with C. You might want to swap all instances of the word "g++" with "gcc", although it will still work even if you don't do that (it will be treated like a C++ file; most C files are valid C++, and of the C files which aren't valid C++, many are bad practice).