r/learnprogramming • • 1d ago

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

17 Upvotes

35 comments sorted by

View all comments

1

u/Merry_Janet 1d ago

Clang or MSCV?
If you mean development environment, VS Code is free.

1

u/Roughneck979 1d ago

Clang? Mscv? Dont know what those are. Sorry

2

u/Round_Thanks_2780 1d ago

Those a compilers.
They read your code and translate it to machine code.

Visual Studio and CodeBlocks run them when you press the "build" button.

2

u/Round_Thanks_2780 1d ago

Clang is mainly used for Apple + Linux development, while MSCV is for Windows development.

1

u/Roughneck979 1d ago

Gotcha, thanx for clearing up. Guess i got more research to do, lol

1

u/Mediocre-Pumpkin6522 1d ago

Compiler front ends. GCC is the GNU Compiler Collection, and Clang takes a different approach but is compatible with GCC. Microsoft Visual C++ is not particularly compatible with either. code:blocks can use any of them but needs to be configured.

If you chose the MinGW install it should use gcc. If you didn't there may not be a compiler. If you installed MS Visual Studio you may have to install the C/C++ work load.

1

u/Roughneck979 1d ago

Ok i didnt install ANY of the workload things so that is probably where i goofed on visual studio

1

u/Merry_Janet 1d ago

Yeah, with VS Code you need to install a C/C++ compiler.
paste "vscode c compiler" into google without quotes and follow the 3 steps.

1

u/Mediocre-Pumpkin6522 1d ago

iirc you get C# default. I remember being surprised by something I had to explicitly install but it's been a while.