SlideShare a Scribd company logo
C++	
  -­‐	
  for	
  Java	
  Developers:	
  
               Intro	
  to	
  C++	
  
            Jussi	
  Pohjolainen	
  
Tampere	
  University	
  of	
  Applied	
  Sciences	
  
C++	
  
•  1998	
  ANSI/ISO	
  Standard:	
  
    –  Core	
  language	
  
    –  Standard	
  Library	
  
•  Many	
  C++	
  libraries	
  exist	
  that	
  are	
  not	
  part	
  of	
  
   the	
  standard	
  	
  
•  New	
  standard:	
  ISO/IEC:2011	
  C++11	
  
C++	
  Standard	
  Library	
  
•  Containers	
  
    –  array,	
  bitset,	
  deque,	
  forward_list,	
  list,	
  …	
  vector	
  
•  General	
  
    –  algorithm,	
  funcUonal,	
  iterator,	
  locale,	
  memory…	
  
•  Strings	
  
    –  string	
  
•  Input	
  and	
  Output	
  
    –  ios,	
  iostream,	
  ostream,	
  sstream..	
  
•  Numerics	
  
    –  complex,numeric,	
  valarray	
  
•  Language	
  support	
  
    –  excepUon,	
  limits,	
  new,	
  typeinfo	
  
C	
  Standard	
  Library	
  
•  Macros,	
  typedefiniUons,	
  funcUons	
  for	
  tasks	
  
   like	
  string	
  handling,	
  mathemaUcal	
  
   computaUons,	
  memory	
  allocaUons..	
  
•  See:	
  
   –  hYp://en.wikipedia.org/wiki/C_standard_library	
  
Diagram	
  from:	
  
hYp://faculty.cs.niu.edu/~mcmahon/CS241/Notes/compile.html	
  
GCC	
  Compiler	
  
•  The	
  GNU	
  Compiler	
  CollecUon	
  (GCC)	
  is	
  a	
  
   compiler	
  system	
  produced	
  by	
  the	
  GNU	
  Project	
  
   supporUng	
  various	
  programming	
  languages.	
  
•  C	
  (gcc),	
  C++	
  (g++),	
  ObjecUve-­‐C	
  (gobjc),	
  Fortran	
  
   (gfortran),	
  Java	
  (gcj)	
  
•  CompaUble	
  IDEs	
  
    –  Dev-­‐C++	
  (Win),	
  NetBeans,	
  Eclipse,	
  QtCreator,	
  
       Xcode	
  
Installing	
  
•  Ubuntu	
  
    –  sudo	
  apt-­‐get	
  install	
  g++	
  
•  Mac	
  OS	
  X	
  
    –  Install	
  Xcode	
  and	
  install	
  command	
  line	
  tools	
  
•  Windows	
  
    –  For	
  example	
  minGW:	
  hYp://sourceforge.net/
       projects/mingw/	
  
Compiling	
  C++	
  Program	
  
•  Simple	
  
   –  g++ mysourcecode.cpp
•  BeYer	
  
   –  g++ -ansi -pedantic -wall
      mysourcecode.cpp -o myapp
•  Running	
  
   –  ./myapp
Code	
  Style	
  
•  Java	
  has	
  “standard”	
  for	
  code	
  style,	
  C++	
  does	
  
   not.	
  
•  Use	
  can	
  use	
  separate	
  apps	
  for	
  “preffy”	
  your	
  
   source	
  code	
  
•  For	
  example:	
  ArUsUc	
  Style	
  
    –  hYp://astyle.sourceforge.net/	
  
Makefiles	
  
•  All	
  these	
  command	
  line	
  arguments	
  can	
  be	
  
   long	
  and	
  hard	
  to	
  write.	
  
•  Use	
  Make!	
  UUlity	
  that	
  automaUcally	
  builds	
  
   apps.	
  
•  hYp://en.wikipedia.org/wiki/Make_(sohware)	
  
makefile
WHAT	
  ABOUT	
  QT?	
  
Qt	
  Hello	
  World	
  
#include <QApplication>
#include <QPushButton>

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QPushButton hello("Hello world!");
    hello.resize(100, 30);

    hello.show();
    return app.exec();
}
SOME	
  C++	
  SYNTAX	
  
cout	
  for	
  output,	
  cin	
  for	
  input	
  
•  Output	
  
    –  cout	
  <<	
  “hello!”;	
  
•  Input	
  
    –  cin	
  >>	
  someVariable;	
  
Datatypes	
  
•  Fundamental	
  types	
  
    –  int,	
  short,	
  long	
  
    –  float,	
  double,	
  long	
  double	
  
    –  bool	
  
    –  char	
  
•  Derived	
  types	
  
    –  arrays,	
  pointers,	
  references..	
  
•  Class	
  types	
  
    –  class,	
  struct,	
  union	
  
const	
  and	
  enum	
  
// Like final in Java
const int NUMBER = 100;
// Using enums
enum DAY { MON = 1, TUE, WED, THU, FRI,
SAT, SUN };
DAY today = MON;
CondiUons	
  in	
  C++	
  
int a = 0;
if(a = 0)
{
   cout << “What the..” << endl;
}
Arrays	
  
const int LENGTH = 5;
int numbers[LENGTH];
numbers[0] = 12;
numbers[1] = 88;
..
About	
  Strings	
  
•  C++	
  has	
  two	
  kind	
  of	
  Strings	
  
    –  char	
  arrays	
  
    –  string	
  –	
  class	
  
C	
  type	
  strings	
  
•  char	
  myString[6]	
  =	
  “Jussi”;	
  
•  //	
  Why	
  6??	
  The	
  array	
  contains	
  now	
  Jussi0!	
  
•  char	
  myString[]	
  =	
  “Jussi”	
  
cin.get	
  
// Reads maxLength number of chars
// from the user
cin.get(myString, maxLength);
// This leaves user given enter ‘n’ to input
// stream, use cin.get again to get rid of
//it..

More Related Content

What's hot

C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
Pranoti Doke
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
M-TEC Computer Education
 
C programming language
C programming languageC programming language
C programming language
Mahmoud Eladawi
 
C program
C programC program
C program
AJAL A J
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
Open Gurukul
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
Sangharsh agarwal
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
Ahmad Idrees
 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)Dushmanta Nath
 
Tutorial on c language programming
Tutorial on c language programmingTutorial on c language programming
Tutorial on c language programming
Sudheer Kiran
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
Wingston
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
Steve Johnson
 
Introduction to C++
Introduction to C++ Introduction to C++
Introduction to C++
Bharat Kalia
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
gajendra singh
 
Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1
Ali Aminian
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for Engineering
Vincenzo De Florio
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
samt7
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic conceptsAbhinav Vatsa
 

What's hot (20)

C programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti DokeC programming_MSBTE_Diploma_Pranoti Doke
C programming_MSBTE_Diploma_Pranoti Doke
 
C Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.comC Programming Tutorial - www.infomtec.com
C Programming Tutorial - www.infomtec.com
 
C programming language
C programming languageC programming language
C programming language
 
C program
C programC program
C program
 
OpenGurukul : Language : C Programming
OpenGurukul : Language : C ProgrammingOpenGurukul : Language : C Programming
OpenGurukul : Language : C Programming
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
C language (Collected By Dushmanta)
C language  (Collected By Dushmanta)C language  (Collected By Dushmanta)
C language (Collected By Dushmanta)
 
Tutorial on c language programming
Tutorial on c language programmingTutorial on c language programming
Tutorial on c language programming
 
Introduction to Basic C programming 01
Introduction to Basic C programming 01Introduction to Basic C programming 01
Introduction to Basic C programming 01
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 
Introduction to C++
Introduction to C++ Introduction to C++
Introduction to C++
 
c++
 c++  c++
c++
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
C Programming
C ProgrammingC Programming
C Programming
 
Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1Learning C++ - Introduction to c++ programming 1
Learning C++ - Introduction to c++ programming 1
 
Advanced C Language for Engineering
Advanced C Language for EngineeringAdvanced C Language for Engineering
Advanced C Language for Engineering
 
Overview of c++ language
Overview of c++ language   Overview of c++ language
Overview of c++ language
 
Intro to c++
Intro to c++Intro to c++
Intro to c++
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
 

Viewers also liked

Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
KurdGul
 
01 c++ Intro.ppt
01 c++ Intro.ppt01 c++ Intro.ppt
01 c++ Intro.pptTareq Hasan
 
20130110 prs presentation ncim c++ 11
20130110 prs presentation ncim c++ 1120130110 prs presentation ncim c++ 11
20130110 prs presentation ncim c++ 11
Harold Kasperink
 
presentation on C++ basics by prince kumar kushwaha
presentation on C++ basics by prince kumar kushwahapresentation on C++ basics by prince kumar kushwaha
presentation on C++ basics by prince kumar kushwaha
Rustamji Institute of Technology
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
Salahaddin University-Erbil
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
Mohamed Loey
 

Viewers also liked (11)

Intro. to prog. c++
Intro. to prog. c++Intro. to prog. c++
Intro. to prog. c++
 
01 c++ Intro.ppt
01 c++ Intro.ppt01 c++ Intro.ppt
01 c++ Intro.ppt
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
C++ programming
C++ programmingC++ programming
C++ programming
 
20130110 prs presentation ncim c++ 11
20130110 prs presentation ncim c++ 1120130110 prs presentation ncim c++ 11
20130110 prs presentation ncim c++ 11
 
C++ language
C++ languageC++ language
C++ language
 
presentation on C++ basics by prince kumar kushwaha
presentation on C++ basics by prince kumar kushwahapresentation on C++ basics by prince kumar kushwaha
presentation on C++ basics by prince kumar kushwaha
 
Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++Introduction to Procedural Programming in C++
Introduction to Procedural Programming in C++
 
C++ ppt
C++ pptC++ ppt
C++ ppt
 
C++ Programming Language
C++ Programming Language C++ Programming Language
C++ Programming Language
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar to Intro to C++ - language

C101 – Intro to Programming with C
C101 – Intro to Programming with CC101 – Intro to Programming with C
C101 – Intro to Programming with C
gpsoft_sk
 
OpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel ComputingOpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel Computing
João Paulo Leonidas Fernandes Dias da Silva
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
Dikshithkumar10
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
EPORI
 
C++ programming: Basic introduction to C++.ppt
C++ programming: Basic introduction to C++.pptC++ programming: Basic introduction to C++.ppt
C++ programming: Basic introduction to C++.ppt
yp02
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
JayarAlejo
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
Infotech27
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
TeacherOnat
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
JayarAlejo
 
Abhishek lingineni
Abhishek lingineniAbhishek lingineni
Abhishek lingineniabhishekl404
 
CPlusPus
CPlusPusCPlusPus
CPlusPus
rasen58
 
Cs1123 11 pointers
Cs1123 11 pointersCs1123 11 pointers
Cs1123 11 pointersTAlha MAlik
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
ssuser0c24d5
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
nilesh405711
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
YashpalYadav46
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
DevliNeeraj
 
Return of c++
Return of c++Return of c++
Return of c++
Yongwei Wu
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overviewTAlha MAlik
 
c++ ppt.ppt
c++ ppt.pptc++ ppt.ppt
c++ ppt.ppt
FarazKhan89093
 

Similar to Intro to C++ - language (20)

C101 – Intro to Programming with C
C101 – Intro to Programming with CC101 – Intro to Programming with C
C101 – Intro to Programming with C
 
OpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel ComputingOpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel Computing
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
C++ programming: Basic introduction to C++.ppt
C++ programming: Basic introduction to C++.pptC++ programming: Basic introduction to C++.ppt
C++ programming: Basic introduction to C++.ppt
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
C++_programs.ppt
C++_programs.pptC++_programs.ppt
C++_programs.ppt
 
Intro to .NET and Core C#
Intro to .NET and Core C#Intro to .NET and Core C#
Intro to .NET and Core C#
 
Abhishek lingineni
Abhishek lingineniAbhishek lingineni
Abhishek lingineni
 
CPlusPus
CPlusPusCPlusPus
CPlusPus
 
Cs1123 11 pointers
Cs1123 11 pointersCs1123 11 pointers
Cs1123 11 pointers
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
Return of c++
Return of c++Return of c++
Return of c++
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
 
c++ ppt.ppt
c++ ppt.pptc++ ppt.ppt
c++ ppt.ppt
 

More from Jussi Pohjolainen

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
Jussi Pohjolainen
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
Jussi Pohjolainen
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
Jussi Pohjolainen
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
Jussi Pohjolainen
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
Jussi Pohjolainen
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
Jussi Pohjolainen
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
Jussi Pohjolainen
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript DevelopmentJussi Pohjolainen
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
Jussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame AnimationJussi Pohjolainen
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
Jussi Pohjolainen
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
Jussi Pohjolainen
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
Jussi Pohjolainen
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
Jussi Pohjolainen
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesJussi Pohjolainen
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platformJussi Pohjolainen
 

More from Jussi Pohjolainen (20)

Moved to Speakerdeck
Moved to SpeakerdeckMoved to Speakerdeck
Moved to Speakerdeck
 
Java Web Services
Java Web ServicesJava Web Services
Java Web Services
 
Box2D and libGDX
Box2D and libGDXBox2D and libGDX
Box2D and libGDX
 
libGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and PreferenceslibGDX: Screens, Fonts and Preferences
libGDX: Screens, Fonts and Preferences
 
libGDX: Tiled Maps
libGDX: Tiled MapslibGDX: Tiled Maps
libGDX: Tiled Maps
 
libGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame AnimationlibGDX: User Input and Frame by Frame Animation
libGDX: User Input and Frame by Frame Animation
 
Intro to Building Android Games using libGDX
Intro to Building Android Games using libGDXIntro to Building Android Games using libGDX
Intro to Building Android Games using libGDX
 
Advanced JavaScript Development
Advanced JavaScript DevelopmentAdvanced JavaScript Development
Advanced JavaScript Development
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
libGDX: Scene2D
libGDX: Scene2DlibGDX: Scene2D
libGDX: Scene2D
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: Simple Frame Animation
libGDX: Simple Frame AnimationlibGDX: Simple Frame Animation
libGDX: Simple Frame Animation
 
libGDX: User Input
libGDX: User InputlibGDX: User Input
libGDX: User Input
 
Implementing a Simple Game using libGDX
Implementing a Simple Game using libGDXImplementing a Simple Game using libGDX
Implementing a Simple Game using libGDX
 
Building Android games using LibGDX
Building Android games using LibGDXBuilding Android games using LibGDX
Building Android games using LibGDX
 
Android Threading
Android ThreadingAndroid Threading
Android Threading
 
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and GesturesCreating Asha Games: Game Pausing, Orientation, Sensors and Gestures
Creating Asha Games: Game Pausing, Orientation, Sensors and Gestures
 
Creating Games for Asha - platform
Creating Games for Asha - platformCreating Games for Asha - platform
Creating Games for Asha - platform
 
Intro to Asha UI
Intro to Asha UIIntro to Asha UI
Intro to Asha UI
 

Recently uploaded

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 

Recently uploaded (20)

PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 

Intro to C++ - language

  • 1. C++  -­‐  for  Java  Developers:   Intro  to  C++   Jussi  Pohjolainen   Tampere  University  of  Applied  Sciences  
  • 2. C++   •  1998  ANSI/ISO  Standard:   –  Core  language   –  Standard  Library   •  Many  C++  libraries  exist  that  are  not  part  of   the  standard     •  New  standard:  ISO/IEC:2011  C++11  
  • 3. C++  Standard  Library   •  Containers   –  array,  bitset,  deque,  forward_list,  list,  …  vector   •  General   –  algorithm,  funcUonal,  iterator,  locale,  memory…   •  Strings   –  string   •  Input  and  Output   –  ios,  iostream,  ostream,  sstream..   •  Numerics   –  complex,numeric,  valarray   •  Language  support   –  excepUon,  limits,  new,  typeinfo  
  • 4. C  Standard  Library   •  Macros,  typedefiniUons,  funcUons  for  tasks   like  string  handling,  mathemaUcal   computaUons,  memory  allocaUons..   •  See:   –  hYp://en.wikipedia.org/wiki/C_standard_library  
  • 5.
  • 7.
  • 8. GCC  Compiler   •  The  GNU  Compiler  CollecUon  (GCC)  is  a   compiler  system  produced  by  the  GNU  Project   supporUng  various  programming  languages.   •  C  (gcc),  C++  (g++),  ObjecUve-­‐C  (gobjc),  Fortran   (gfortran),  Java  (gcj)   •  CompaUble  IDEs   –  Dev-­‐C++  (Win),  NetBeans,  Eclipse,  QtCreator,   Xcode  
  • 9. Installing   •  Ubuntu   –  sudo  apt-­‐get  install  g++   •  Mac  OS  X   –  Install  Xcode  and  install  command  line  tools   •  Windows   –  For  example  minGW:  hYp://sourceforge.net/ projects/mingw/  
  • 10.
  • 11.
  • 12.
  • 13. Compiling  C++  Program   •  Simple   –  g++ mysourcecode.cpp •  BeYer   –  g++ -ansi -pedantic -wall mysourcecode.cpp -o myapp •  Running   –  ./myapp
  • 14. Code  Style   •  Java  has  “standard”  for  code  style,  C++  does   not.   •  Use  can  use  separate  apps  for  “preffy”  your   source  code   •  For  example:  ArUsUc  Style   –  hYp://astyle.sourceforge.net/  
  • 15.
  • 16. Makefiles   •  All  these  command  line  arguments  can  be   long  and  hard  to  write.   •  Use  Make!  UUlity  that  automaUcally  builds   apps.   •  hYp://en.wikipedia.org/wiki/Make_(sohware)  
  • 18.
  • 20. Qt  Hello  World   #include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec(); }
  • 22. cout  for  output,  cin  for  input   •  Output   –  cout  <<  “hello!”;   •  Input   –  cin  >>  someVariable;  
  • 23. Datatypes   •  Fundamental  types   –  int,  short,  long   –  float,  double,  long  double   –  bool   –  char   •  Derived  types   –  arrays,  pointers,  references..   •  Class  types   –  class,  struct,  union  
  • 24. const  and  enum   // Like final in Java const int NUMBER = 100; // Using enums enum DAY { MON = 1, TUE, WED, THU, FRI, SAT, SUN }; DAY today = MON;
  • 25. CondiUons  in  C++   int a = 0; if(a = 0) { cout << “What the..” << endl; }
  • 26. Arrays   const int LENGTH = 5; int numbers[LENGTH]; numbers[0] = 12; numbers[1] = 88; ..
  • 27. About  Strings   •  C++  has  two  kind  of  Strings   –  char  arrays   –  string  –  class  
  • 28. C  type  strings   •  char  myString[6]  =  “Jussi”;   •  //  Why  6??  The  array  contains  now  Jussi0!   •  char  myString[]  =  “Jussi”  
  • 29. cin.get   // Reads maxLength number of chars // from the user cin.get(myString, maxLength); // This leaves user given enter ‘n’ to input // stream, use cin.get again to get rid of //it..