February 24th, 2013, 04:20 PM
How do pro C programmers compile code?
I'm reading a book (Head first C) because that's how I'm learning C programming. In one of the chapters it talks about making small tools and by that they use the command prompt to compile their code. Now, I'm confused when dealing with the command prompt because I never delt with it before. So I'm afraid that this book will keep on talking about stuff like that and get me confused.
I use Visual Studio to compile my code. Is that ok? Can I still make complex programs with it or do I need to know how to compile C code in the command line.
February 24th, 2013, 05:37 PM
The answer to the question depends on many factors such as:
- On which platform do you plan to work (Windows, Linux/Unix, ...)
- What do you want to do in terms of maintenance/development
- How many people are working on that project
- What are the tools already used for compiling and version management by the project team?
Anyway, IMHO, anybody should be familiar with command line environment, because it is really powerful and gives you many possibilities, particularly when you start scripting in parallel. In many systems, you don't even have a GUI and the command line (shell) is the only thing you have. So, yes, I think you have to understand and learn it.
Well, if it is a book that is written for beginners, I don't see why you shouldn't be able to continue, just read the book's chapters according to the order that the author recommends.
Originally Posted by miz656
it is a well known tool, but again, it depends on what you want to do in the future and for which platform you plan to develop in C (Linux? Windows?, ...)
Originally Posted by miz656
February 24th, 2013, 05:42 PM
You can carry on using visual studio to compile your programs if you want.
> Can I still make complex programs with it or do I need to know how to compile C code in the command line.
It depends how curious you are to find out new things.
Sometimes, it's just useful to be able to open a simple text editor, write a simple program and be able to simply type at the command prompt
and have it produce prog.exe, without all the hassle of creating a new project in vs, along with all the other baggage.
February 24th, 2013, 06:19 PM
I'm sorry. I'm a fourteen year old who is just testing and experiencing.
Let me rephrase the question. Can I do the same things with Visual Studio when using the command prompt?(if not, more advanced things in Visual Studio)
In the C book it talks about making some type of GPS and then gives an example using the > operator in the command line.
Thanks again for answering me
February 25th, 2013, 02:12 AM
> In the C book it talks about making some type of GPS and then gives an example using the > operator in the command line.
The > operator on the command line is output redirection.
just displays on the console, whereas
myprog.exe > file.txt
puts all the output in file.txt
Now it may be possible on one of the dialogs visual studio provides where you can achieve the same thing.