1 / 8

C++ Coding and Compiling

C++ Coding and Compiling. Why QT/C++ Over Java?. Java is easier than C++ Java has built in GUIs Java is multi-platform C/C++ is more used in industry QT adds GUIs to C++ QT adds multi-platform IO to C++. C++ is like C. Comments are the same // or /* */

adsila
Download Presentation

C++ Coding and Compiling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. C++ Coding and Compiling

  2. Why QT/C++ Over Java? • Java is easier than C++ • Java has built in GUIs • Java is multi-platform • C/C++ is more used in industry • QT adds GUIs to C++ • QT adds multi-platform IO to C++

  3. C++ is like C • Comments are the same • // or /* */ • Still need to include header files • #include

  4. C++ is a little different • Declaring variables have 3 flavors • type-expr variableName; • type-expr variableName = value; • type-expr variableName (value); • Namespaces • Like a group of header files. By listing the namespace, you include all of the files.

  5. Inputs and Outputs • cin -Standard Input (Keyboard) • cout -Standard Output (Text) • cerr -Standard Error Output (Text) • These are all examples of 'streams' Streams are a key way that C++ thinks of inputs and outputs. They are also Objects!

  6. What is an Object? • An object is like a structure • An object has things that can be done only to that object • An object has attributes that apply only to it • Example: A car is an object

  7. Lets look at some code

  8. Compiling C++ • g++ file.cpp • produces 'a.out' or 'a.exe' • Makefiles can also be used (common)

More Related