Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— 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)


Download ppt "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."

Similar presentations


Ads by Google