1 / 8

C++ vs Java: A Comprehensive Guide to QT, GUIs, and Coding Practices

Explore the critical differences between C++ and Java, focusing on why C++ remains prevalent in the industry. Java is user-friendly with built-in GUIs and cross-platform capabilities, while C++ offers enhanced performance and QT for GUI development. Understand the nuances of coding in C++, including variable declarations, namespaces, and input/output streams. Learn about the compilation process using g++ and the advantage of using Makefiles for larger projects. This guide is perfect for developers looking to deepen their understanding of C++ and its applications.

adsila
Télécharger la présentation

C++ vs Java: A Comprehensive Guide to QT, GUIs, and Coding Practices

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