Answer the question
In order to leave comments, you need to log in
Ubuntu 12.04. I'm learning programming. On what to write programs in this system?
Tell about the best development environments so that they are understandable for a beginner.
Or tell me how to install and configure the built-in terminal compiler for C/C++?
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Judging by what you write, it's too early for you to write without an IDE. Therefore, I, for my part, will vote for QtCreator. It is the most understandable of all the sish IDEs under ubuntu, as it seems to me. In general, at one time I started from under Windows on Visual Studio. Previously, everything was very clear there and the most adequate auto-completion. I don't know what's going on there now. At the initial level, I would advise not to get hung up on the system from which you are programming. The more she takes on, the better.
Once you're fluent in your IDE of choice (which is quite a long time), you can move on to programming in any text editor, followed by a build with gcc, g++
and then and make
, this will deepen your understanding of what's really going on "behind the scenes".
And your
warning: return type of «main» is not «int» [-Wmain]
main
your program should return int
. There will be no error when you write void
it, but the compiler won't like it.
built-in terminal compiler for C/C++
Geany
Code::Blocks
NetBeans
QT Creator
There are guides on the net for setting up and using it.
Which built-in compiler to which terminal? The compiler is a separate program that is not built anywhere. It has nothing to do with the terminal.
For a beginner, it is better to use a text editor. Moreover, a text editor without IDE capabilities still needs to be searched. Use vim. It will be unusual, but then you won’t be able to live without it. Personally, I use QtCreator.
About the compiler. There is a main compiler - gcc. I do not know if it is installed there by default, but you can use it. You can also install clang - for now this will not play any role.
Eclipse? And the compiler, I think, is already installed and configured.
Anonymous.c:2:7: warning: return type of "main" is not "int" [-Wmain]
this is what I get when I write a helloworld in C in Geany
Correct hello world in C looks like this:#include <stdio.h> int main(void) { printf("Hello, world!"); return 0; }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question