#C wont work
42 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
For the beginning I'd just advise you to compile manually via terminal.
Also I'm not sure if you got the correct IDE, cause "Microsoft Visual Studio" (https://visualstudio.microsoft.com/) isn't exactly desgined for C.
You probably intended to download "Visual Studio Code" (https://code.visualstudio.com/).
I dont want to use a third party compiler so wich one should i use then(also i already have VS code
Visual studio is fine for now realistically
what are you actual error messages though
itll tell you in the output window
c programs do lots of checks during compilation before you get an executable out the other end. So it could be from a syntax error (e.g. missing a semicolon) or a type-checking error (using the wrong types) or linking error (using functions which dont exist) or a whole host of things
The only way to know is to read the error messages
agreed
starting with C on VS is like giving a brick to a toddler
Compiler and IDE/text editor are different things.
Your compiler is probably either GNU GCC (Linux) or MinGW (Windows). Possibly it's clang but if so then I have no clue. Also if you're not forced to use MinGW then you'll likely do yourself a favour to use GNU GCC under Linux. What I did and what I'd recommend is to buy a 120-250 GB SSD that you install Linux on and everytime you want to do work with C you boot to this drive. This has the beneficial side effect of removing many distractions like f.e. games. If you can't get an SSD then Windows nowadays has WSL (Windows Subsystem for Linux) natively built in, which allows you to emulate a Linux operating system. Even better, WSL is supported by VS Code (via a plugin or natively, not sure), meaning you can write code with your VS Code opened under Windows, but it has access to this WSL.
VS Code is an extensible text editor, i.e. it's just an editor that you can "upgrade" with plugins, but under the hood all these plugins rely on you having a compiler.
My suggestion as mentioned before is to use VS Code together with a C linter (i.e. a plugin that does syntax highlighting plus more stuff like f.e. providing signatures + documentation for functions/libraries).
To compile and run your code I would suggest using the terminal in the working directory with the commands gcc your_file.c -o -output_file.o and ./output_file.o. Once you've done that a few times you can start into looking what Makefiles are to shorten this process to simply typing make run or something alike. Don't forget that arrow key UP lets you repeat your latest commands.
linux is the best compiler
What're you talking about
the mans porgrmans wont work
linux isn't a compiler
what do you know you have a book on your head
Haha, well, the book on my head might be a silly look, but it doesn't change the fact that Linux isn't a compiler
you sound like chatgpt
What does that even mean
Look man, Linux isn't a compiler, idk what to tell you
Here read it yourself: https://www.kernel.org/doc/html/latest/
Ok.
Keep reading
one time i was learning to cartwheel and i fell over
Some say you're still cartfalling to this day
I know that those things are different things but visual studio has a built in one
This question is being automatically marked as stale.
If your question has been answered, run !solved.
If your question is not answered feel free to bump the post or re-ask.
Take a look at !howto ask for tips on improving your question.
why do people say that an IDE is a text editor and compiler is not part of the IDE like that's the whole point of IDE it's in the name "integrated development environment" meaning everything is there
No, not really
IDEs, ideally, make working with the environment easier. It does not mean they bundle the entire environment
Python IDEs don't manage pip packages or python installations. But they might help with virtual environments or conda environments. If that example is helpful for you.
all I can say is in my experience an IDE makes everything pointlessly harder
less software in the way of what you want to do with a computer is better
and also, I hate javascript
Sounds like a

i prefer to use tty1 for everything