Can be compiled c ++ in Ubuntu
This is a brief introduction to the operation of the GNU C ++ Compiler. It is not an introduction to the language C.. For this I refer to the literature mentioned below. The compilation of C ++ programs for the terminal mode of Linux is discussed. The graphic programming of X-Windows by means of the Qt3 / Qt4 graphics library can be found in the KDE or Qt books in the appendix.
The language C and C ++ are the standard languages in Linux, although practically every modern computer language is available in Linux. UNIX and C are closely related. The C language was invented by Kerningham and Ritchie in 1972 specifically for the development of UNIX. It has developed in several stages since then. The old Kerningham / Ritchie standard is practically no longer used because it can lead to very illegible programs. Anyone who programs in C today should adhere to the ANSI-C standard.
The C ++ language was developed by Bjaarne Stroustrup in 1985. It too has gone through several stages of evolution to this day. Today the ANSI C ++ 3.0 version is the newest standard. C ++ extends the C language to include the concepts of object-oriented programming. These are the formation of classes (data encapsulation), inheritance, polymorphism, the overloading of operators and much more. However, every C ++ compiler can also work as a C compiler, which means that a migration from C to C ++ is possible.
Linux itself is not written in C ++, but in C with smaller assembler parts. C is ideal for developing operating systems, as it can generate highly optimized code without necessarily having to resort to assembler. The C code is very portable, so that Linux is available today on practically every type of CPU. The C ++ language is used, for example, in the Qt graphics library.
The compiler gcc 4.2.1
using namespace std;
I don't want to explain the program explicitly here. You can learn C or C ++ in our LINUX group. Simply enter the source code and save it under versuch.cpp.
1st translation attempt
Enter the command:
2. Translation attempt
Enter the command:
Generate debugable code
A machine program does not inherently contain any debugable code. Unless you love uncommented machine code. To debug C ++ programs, the C ++ compiler must append a symbol table with variables and line information to the code.
With the compiler option -G we tell the GNU compiler to append this symbol table to the code.
Enter the command:
The GNU C ++ compilers know a huge number of compiler options, one could write an entire book about them. I would like to name just a few:
Graphic programming under Linux:
C ++ GUI programming with Qt3
Jasmin Blanchette (English)
Prentice Hall 2004
(very current with Qt 3.2)
The Qt book
SuSE Press 2001
Markt + Technik Verlag 2001
KDE and Qt programming
Programming with Qt 2nd edition
O'Reilly Publishing 2001
Franzis publishing house
C / C ++ programming:
C programming under Linux
SuSE Press 2002
Now I'm learning C ++
Markt + Technik Verlag 1999
(very nice book for beginners)
C / C ++
Markt & Technik Verlag
(Reference book C / C ++ syntax)
- Would Ted Cruz be a good president
- What are some healthy foods for spines
- What is Camtasia
- Can water have a concentration
- Uses Windows bash scripting
- Who are ZocDoc's competitors
- Which framework is better NET or Hibernate
- What is the real bitcoin symbol logo
- What are some examples of monocot plants
- How do animals wander
- Indonesians get drunk
- Has Windows 10 OCR
- What is the best craft store
- How does your natal chart define you?
- Why can we see smoke
- Why can't helium be produced artificially?
- Will V-wing passenger aircraft be successful
- A period of 2 to 3 days is normal
- Why does Italy not have megacities?
- Deserves an investment in Bitcoin's interest
- How many channels does Amsterdam have
- How is fresh cheese made 1
- Is there a loyalty in business?
- How brutal were the rulers of the Delhi Sultanate