This thread seems to be going in the direction of "What compiler and/or IDE should I use for C programming on Linux?", so I am moving it to the Tech Board.
This thread seems to be going in the direction of "What compiler and/or IDE should I use for C programming on Linux?", so I am moving it to the Tech Board.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Compiling in console can help you understand what's going on, i agree with that, but what about using a command line text editor? What's the point in using them for programming?
I do not know about fte, but I think Vim comes with a GUI version, and either way its unique vi heritage and interface is the point.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
This one says "make"
If I happen to be in Linux I like tend to use KWrite or vi - makefiles with both, using a shell for building & testing.
but what about using a command line text editor? What's the point in using them for programming?obsolete, DOS maybe. A linux bash shell? No. bash is windows command prompt on steriods. Take some time to learn what bash can do. Some problems in Linux can be solved with shell scripts alone, and not require writing a program.after using Windows for a long time, it comes a bit strange to do things in terminal. It's like using DOS command prompt in XP, which i don't like very much and find obsolete.
Not really. Makefiles take 2 minutes at most to write. (And you do it once per project.) From there, you type "make" and make will rebuild only what needs it. (Dev-C++ uses make behind the scenes.) I used to use Dev-C++, but it was a little braindead in some things... I primarily use Textpad, sometimes Notepad++ (or if I'm not at home). vi in Linux does the nicest job of keeping indentation, everything from tabs inside a function to keeping comments running. (And still gives syntax highlighting etc. If I'd ever take a day or two to learn vi proper, I'd probably know what else it could do...)I used to do all my work with Dev-C++ and it really made things easy for me. While trying to figure out these things, why some people especially like using command line compilers or text editors? Isn't it time consuming and unuseful?
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
vim for creating the C source code
type -> vim hello.c
vim
------
in vim type :wqCode:#include <stdio.h> int main(void) { puts("Hello Cruel World"); return 0; }
compile --> gcc hello.c -o hello
fire up the program --> ./hello
Hello Cruel World
vim and gcc --- they get the job done
This is going to lead to a text-editor war...
Allowing omitting the return 0 was a new thing in the C++ standard and is not allowed in C89. The reason that it is not listed in the incompatibilities section is that that section only lists things that prevent C code from being compiled as C++ code, not things that prevent the other way round. (That would be pretty stupid. You'd have to list every single new feature in C++.) Given that C programs MUST have the return 0, while C++ programs MAY have it, all C programs are valid C++ in that respect.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
> Allowing omitting the return 0 was a new thing in the C++ standard and is not allowed in C89
I agree, this was a completely stupid thing to add to the C++ standard.
C++ went out of it's way to try to eliminate all implicit behaviour inherited from C (a good thing), then starts adding some of it's own (a bad thing). No other int returning function has this behaviour.
My guess is that it was added as a 'sop' to make all those void main programs easy to change by simply replacing 'void' with 'int' and the program was instantly up to spec. No need to go to the trouble of adding 'return 0;' in the code (oh the pain of a few keystrokes).
*mutters something about being off-topic*
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.