SlideShare a Scribd company logo
1
C++ Advanced
Features
Trenton Computer Festival
March 18, 2017
Michael P. Redlich
@mpredli
about.me/mpredli/
Who’s Mike?
• BS in CS from
• “Petrochemical Research Organization”
• Java Queue News Editor, InfoQ
• Ai-Logix, Inc. (now AudioCodes)
• Amateur Computer Group of New Jersey
2
Objectives
• Overloaded Operators
• Templates
• Exception Handling
• Namespaces
• Introduction to the Standard Template
Library (STL)
3
Overloaded Operators
4
What are Overloaded
Operators?
• Define basic operations for objects of user-
defined types
• as if they were built-in types
• Often referred to as “syntactic sugar”
5
6
// String.h - a simple string class
class String {
private:
char *string;
public:
String(char const *str) {
string = new char[strlen(str) + 1];
strcpy(string,str);
}
~String(void) {
delete[] string;
}
char *getString(void) const {
return string;
}
};
7
// main application
#include “String.h”
// create two different objects of type String
String string1 = “Hello, C++ Users Group!”;
String string2 = “Hello, Java Users Group!”;
// a conditional *without* an overloaded equality operator
if(strcmp(string1.getString(),string2.getString()) == 0)
// do this
else
// do that
// a conditional *with* an overloaded equality operator
if(string1 == string2)
// do this
else
// do that
Overloaded Operators
(1)
• An overloaded operator has the form:
• T [class::]operatorω(paramList)
8
Overloaded Operators
(2)
•string1 == string2
• interpreted as
string1.operator==(string2);
• string1 is the object in control
• string2 is the argument passed into the
operator
9
10
// Equality Operator
bool string::operator==(string const &s) {
return(strcmp(
getString(),s.getString()) == 0);
}
Overloaded Operators
(3)
• Attractive, but can be dangerous!!
• deep vs. shallow copy
• assignment operator side effects
• The compiler automatically generates an
assignment operator if one is not explicitly
defined
• memberwise assignments
11
Overloaded Operators
(4)
12
“Hello, C++ Users Group!”
“Hello, Java Users Group!”
string1.string
string2.string
13
// compiler-generated Assignment Operator
string &string::operator=(string const &s) {
string = s.string;
return *this;
}
// main application
string1 = string2;
Overloaded Operators
(5)
14
“Hello, C++ Users Group!”
“Hello, Java Users Group!”
string1.string
string2.string
15
// user-defined Assignment Operator
string &string::operator=(string const &s) {
delete[] string;
string = new char[strlen(s) + 1];
strcpy(string,s);
return *this;
}
// application
string1 = string2;
Overloaded Operators
(6)
16
“Hello, Java Users Group!”
“Hello, Java Users Group!”
string1.string
string2.string
Overloaded Operators
(7)
17
Operators Than Can Be Overloaded
+ - * / % ^ & | ~ !
= < > += -+ *= /= %= ^= &=
|= << >> >>= <<= != <= >= &&
|| ++ -- ‘ ->* -> () []
ne
w
de
le
te
Overloaded Operators
(8)
18
Operators That Cannot Be Overloaded
. .* :: ?:
Overloaded Operators
(9)
• Limitations:
• the meaning of an operator cannot be changed
• the number of operands for an operator cannot
be changed
• operator precedence and associativity cannot be
changed
• no personal operators!!
19
Templates
20
What are Templates?
• Used for generic programming
• Two kinds:
• class templates
• member function templates
21
Templates (1)
• Prototypes:
• template <class T> returnType
functionName(paramList) {}
• template <class T> class
className {}
22
23
// swap member functions to handle different data types
void swap(int &first,int &second) {
int temp = second;
second = first;
first = temp;
}
void swap(float &first,float &second) {
float temp = second;
second = first;
first = temp;
}
void swap(char *&first,char *&second) {
char *temp = second;
second = first;
first = temp;
}
24
/*
* function template to swap two elements
* of any data type
*/
template <class T>
void swap(T &first,T &second) {
T temp = second;
second = first;
first = temp;
}
Templates (2)
• A template specialization is the specific use
of a template member function or class
• swap<int>(1,2);
• swap<float>(1.7,3.5);
• swap<char>(‘a’,’b’);
• swap<char *>(“Mets”,”Jets”);
25
Exception Handling
26
What is Exception
Handling?
• A more robust method for handling errors
than fastidiously checking for error codes
• error code checking is tedious and can obscure
program logic
27
Exception Handling (1)
• Throw Expression:
• raises the exception
• Try Block:
• contains a throw expression or a member
function that throws an exception
28
Exception Handling (2)
• Catch Clause(s):
• handles the exception
• defined immediately after the try block
• multiple catch clauses allowed
• no implicit data type conversions
• catch(...) catches any exception type
29
C++ Exception Model
• Destructors invoked for all live objects as
the stack “unwinds”
• Exception Specification
• specify what type of exception(s) a member
function will throw
• Termination vs. Resumption semantics
30
31
// exception handling example
#include <string>
#include <stdexcept>
void fred(void) {
FILE *file = fopen(“filename.txt”,”rt”);
try {
if(file == NULL) { // file could not be opened
throw 1;
}
int g = george(-1);
}
catch(int e) {
cout << “ERROR: Could not open file...” << endl;
}
catch(string const message) {
cout << message << endl;
}
// other statements...
}
// continued on next slide...
32
// continued from previous slide...
int george(int n) {
if(n < 0) {
string message = “ERROR: Value less than zero...”;
throw message;
}
// other statements...
return n;
}
C++ Exception Class
Hierarchy (1)
• exception
• logic_error (client program errors)
• runtime_error (external errors)
• bad_alloc (memory allocation errors)
33
C++ Exception Class
Hierarchy (2)
• exception
• bad_cast (dynamic casting errors)
• bad_exception (unexpected())
• bad_typeid (RTTI errors)
34
35
// exception handling example (revised)
#include <string>
#include <stdexcept>
void fred(void) {
FILE *file = fopen(“filename.txt”,”rt”);
try {
if(file == NULL) { // file could not be opened
throw runtime_error(“ERROR: Could not open file...”);
}
int g = george(-1);
}
catch(runtime_error &re) {
cout << re.what() << endl;
}
catch(string const message) {
cout << message << endl;
}
// other statements...
}
Exception Handling (3)
• Do not throw exceptions:
• to indicate special return values
• in copy constructors and assignment operators
• stroustrup.com/3rd_safe.pdf
36
Namespaces
37
What are Namespaces?
• Used to prevent global naming conflicts
• All C++ standard library components are
contained within a single namespace called
std
38
39
// an example of using header files from different sources
// baseball.h
...
int strike = 0;
...
// bowling.h
...
bool strike = false;
...
// main application
#include baseball.h
#include bowling.h // ERROR: strike already declared
40
// an example of using header files from different sources
// baseball.h
namespace baseball {
...
int strike = 0;
...
}
// bowling.h
namespace bowling {
...
bool strike = false;
...
}
// main application
#include baseball.h
#include bowling.h // OK!
Namespaces (1)
• Fully-qualified member names:
• namespace name
• scope resolution operator (::)
• member name
• baseball::strike
• bowling::strike
41
Aliases
• Provides shorthand for the fully-qualified
namespace name
• Has the form:
• namespace m = N;
• namespace bb = baseball;
• namespace bw = bowling;
42
Using Directive
• Provides access to all members of a
namespace without having to write the
fully-qualified namespace member names
• Has the form:
• using namespace N;
• using namespace baseball;
• using namespace bowling;
43
Using Declaration
• Provides access to individual members of a
namespace without having to write the
fully-qualified namespace member names
• Has the form:
• using N::m;
• using baseball::strike;
• using bowling::strike;
44
Standard Template
Library (STL)
45
What is the STL?
• A subset of Standard C++
• First developed by HP Labs in 1994
• Three main parts:
• containers
• iterators
• algorithms
46
What are Containers?
• A data structure that contains a sequence
of elements
• Sequential containers:
• organize elements linearly
• Sorted associative containers:
• organize elements based on a key
47
Containers (1)
• Primarily chosen by how well it can
perform certain operations, such as:
• add elements to the container
• remove elements from the container
• rearrange elements within the container
• inspect elements within the container
48
Containers (2)
49
vector deque list set/map
insert O(n) O(n) O(1) O(nlogn)
prepend O(n) O(1) O(1) O(nlogn)
find O(n) O(n) O(n) O(nlogn)
X[i] O(1) O(1) O(n) O(n)
pointers 0 1 2 3
What are Iterators?
• A generalization of a C/C++ pointer
• Used to access elements within an ordered
sequence
• Considered the “glue” that tie together
containers and algorithms
50
Iterators
• Five types:
• input
• output
• forward
• bi-directional
• random access
51
52
#include <vector>
typedef vector<int>::iterator iterator
vector<int> v(10);
for(int i = 0;i < 9;++i) {
v.push_back(i);
}
iterator current = v.begin();
iterator last = v.end();
while(current != last) {
cout << *current << “n”;
++current;
}
0 1 2 3 4 5 6 7 8
current last
What are Algorithms?
• Perform various operations on containers
such as:
• searching
• sorting
• transforming
53
Algorithms
• Non-Mutating
• binary_search
• count
• equal
• find
• Mutating
• copy
• generate
• remove
• reverse
• sort
54
Popular C++
Compilers
55
• Embarcadero C++ Builder XE7
• embarcadero.com/products/cbuilder
• MicrosoftVisual C++
• microsoft.com
• Intel System Studio
• software.intel.com/en-us/c-
compilers
Popular C++
Compilers
56
• Open Watcom 1.9 (June 2010)
• openwatcom.org
Local C++ User
Groups
• ACGNJ C++ Users Group
• facilitated by Bruce Arnold
• acgnj.barnold.us
57
Further Reading (1)
58
• C & C++ Code Capsules
• Chuck Allison
• freshsources.com
• The C++ Programming Language
• Bjarne Stroustrup
• stroustrup.com/4th.html
Further Reading (2)
59
• The Annotated C++ Reference Manual
• Margaret Ellis and Bjarne Stroustrup
• stroustrup.com/arm.html
• 1997 C++ Public Review Document
• C++ ISO JTC1/SC22/WG21 Committee
• open-std.org/jtc1/sc22/open/n2356
Upcoming Events
• ACGNJ Java Users Group
• Dr. Venkat Subramaniam
• Monday, March 19, 2018
• DorothyYoung Center for the Arts, Room 106
• Drew University
• 7:30-9:00pm
• “Twelve Ways to Make Code Suck Less”
60
61
Thanks!
mike@redlich.net
@mpredli
redlich.net
slideshare.net/mpredli01
github.com/mpredli01
Upcoming Events
• March 17-18, 2017
•tcf-nj.org
• April 18-19, 2017
•phillyemergingtech.com
62

More Related Content

What's hot

Java Concurrency by Example
Java Concurrency by ExampleJava Concurrency by Example
Java Concurrency by Example
Ganesh Samarthyam
 
Java byte code in practice
Java byte code in practiceJava byte code in practice
Java byte code in practice
Rafael Winterhalter
 
Lambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeLambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive Code
Ian Robertson
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
JiandSon
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVM
Rafael Winterhalter
 
Testing (eng)
Testing (eng)Testing (eng)
Testing (eng)
Derrick Chao
 
Дмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI векеДмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI веке
Sergey Platonov
 
JDK Power Tools
JDK Power ToolsJDK Power Tools
JDK Power Tools
Tobias Lindaaker
 
Monitoring distributed (micro-)services
Monitoring distributed (micro-)servicesMonitoring distributed (micro-)services
Monitoring distributed (micro-)services
Rafael Winterhalter
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Anton Arhipov
 
Live Updating Swift Code
Live Updating Swift CodeLive Updating Swift Code
Live Updating Swift Code
Bartosz Polaczyk
 
Tips and tricks for building high performance android apps using native code
Tips and tricks for building high performance android apps using native codeTips and tricks for building high performance android apps using native code
Tips and tricks for building high performance android apps using native code
Kenneth Geisshirt
 
Vocabulary Types in C++17
Vocabulary Types in C++17Vocabulary Types in C++17
Vocabulary Types in C++17
Bartlomiej Filipek
 
Lab4
Lab4Lab4
Easy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVEEasy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVE
Uehara Junji
 
01 Java Language And OOP Part I LAB
01 Java Language And OOP Part I LAB01 Java Language And OOP Part I LAB
01 Java Language And OOP Part I LAB
Hari Christian
 
Let's talks about string operations in C++17
Let's talks about string operations in C++17Let's talks about string operations in C++17
Let's talks about string operations in C++17
Bartlomiej Filipek
 
Sailing with Java 8 Streams
Sailing with Java 8 StreamsSailing with Java 8 Streams
Sailing with Java 8 Streams
Ganesh Samarthyam
 
Multithreading done right
Multithreading done rightMultithreading done right
Multithreading done right
Platonov Sergey
 
Java Programming - 03 java control flow
Java Programming - 03 java control flowJava Programming - 03 java control flow
Java Programming - 03 java control flow
Danairat Thanabodithammachari
 

What's hot (20)

Java Concurrency by Example
Java Concurrency by ExampleJava Concurrency by Example
Java Concurrency by Example
 
Java byte code in practice
Java byte code in practiceJava byte code in practice
Java byte code in practice
 
Lambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive CodeLambda Chops - Recipes for Simpler, More Expressive Code
Lambda Chops - Recipes for Simpler, More Expressive Code
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVM
 
Testing (eng)
Testing (eng)Testing (eng)
Testing (eng)
 
Дмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI векеДмитрий Нестерук, Паттерны проектирования в XXI веке
Дмитрий Нестерук, Паттерны проектирования в XXI веке
 
JDK Power Tools
JDK Power ToolsJDK Power Tools
JDK Power Tools
 
Monitoring distributed (micro-)services
Monitoring distributed (micro-)servicesMonitoring distributed (micro-)services
Monitoring distributed (micro-)services
 
Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012Mastering Java Bytecode With ASM - 33rd degree, 2012
Mastering Java Bytecode With ASM - 33rd degree, 2012
 
Live Updating Swift Code
Live Updating Swift CodeLive Updating Swift Code
Live Updating Swift Code
 
Tips and tricks for building high performance android apps using native code
Tips and tricks for building high performance android apps using native codeTips and tricks for building high performance android apps using native code
Tips and tricks for building high performance android apps using native code
 
Vocabulary Types in C++17
Vocabulary Types in C++17Vocabulary Types in C++17
Vocabulary Types in C++17
 
Lab4
Lab4Lab4
Lab4
 
Easy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVEEasy Going Groovy 2nd season on DevLOVE
Easy Going Groovy 2nd season on DevLOVE
 
01 Java Language And OOP Part I LAB
01 Java Language And OOP Part I LAB01 Java Language And OOP Part I LAB
01 Java Language And OOP Part I LAB
 
Let's talks about string operations in C++17
Let's talks about string operations in C++17Let's talks about string operations in C++17
Let's talks about string operations in C++17
 
Sailing with Java 8 Streams
Sailing with Java 8 StreamsSailing with Java 8 Streams
Sailing with Java 8 Streams
 
Multithreading done right
Multithreading done rightMultithreading done right
Multithreading done right
 
Java Programming - 03 java control flow
Java Programming - 03 java control flowJava Programming - 03 java control flow
Java Programming - 03 java control flow
 

Similar to C++ Advanced Features

Getting Started with C++
Getting Started with C++Getting Started with C++
Getting Started with C++
Michael Redlich
 
Getting started with C++
Getting started with C++Getting started with C++
Getting started with C++
Michael Redlich
 
C
CC
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
Steve Johnson
 
c++ UNIT II.pptx
c++ UNIT II.pptxc++ UNIT II.pptx
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp full
Võ Hòa
 
Unit ii
Unit iiUnit ii
Unit ii
snehaarao19
 
C++ process new
C++ process newC++ process new
C++ process new
敬倫 林
 
Object oriented programming in C++
Object oriented programming in C++Object oriented programming in C++
Object oriented programming in C++
jehan1987
 
c++ ppt.ppt
c++ ppt.pptc++ ppt.ppt
c++ ppt.ppt
FarazKhan89093
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
raksharao
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
MZGINBarwary
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overviewTAlha MAlik
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basics
LovelitJose
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzer
Andrey Karpov
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).pptAlok Kumar
 
Return of c++
Return of c++Return of c++
Return of c++
Yongwei Wu
 
Introduction to Python for Plone developers
Introduction to Python for Plone developersIntroduction to Python for Plone developers
Introduction to Python for Plone developers
Jim Roepcke
 
C++ programming intro
C++ programming introC++ programming intro
C++ programming intromarklaloo
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
ssuser0c24d5
 

Similar to C++ Advanced Features (20)

Getting Started with C++
Getting Started with C++Getting Started with C++
Getting Started with C++
 
Getting started with C++
Getting started with C++Getting started with C++
Getting started with C++
 
C
CC
C
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 
c++ UNIT II.pptx
c++ UNIT II.pptxc++ UNIT II.pptx
c++ UNIT II.pptx
 
Getting started cpp full
Getting started cpp   fullGetting started cpp   full
Getting started cpp full
 
Unit ii
Unit iiUnit ii
Unit ii
 
C++ process new
C++ process newC++ process new
C++ process new
 
Object oriented programming in C++
Object oriented programming in C++Object oriented programming in C++
Object oriented programming in C++
 
c++ ppt.ppt
c++ ppt.pptc++ ppt.ppt
c++ ppt.ppt
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
 
Programming in java basics
Programming in java  basicsProgramming in java  basics
Programming in java basics
 
The operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzerThe operation principles of PVS-Studio static code analyzer
The operation principles of PVS-Studio static code analyzer
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
 
Return of c++
Return of c++Return of c++
Return of c++
 
Introduction to Python for Plone developers
Introduction to Python for Plone developersIntroduction to Python for Plone developers
Introduction to Python for Plone developers
 
C++ programming intro
C++ programming introC++ programming intro
C++ programming intro
 
lecture02-cpp.ppt
lecture02-cpp.pptlecture02-cpp.ppt
lecture02-cpp.ppt
 

More from Michael Redlich

Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHub
Michael Redlich
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Building Microservices with Micronaut:  A Full-Stack JVM-Based FrameworkBuilding Microservices with Micronaut:  A Full-Stack JVM-Based Framework
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Michael Redlich
 
Building Microservices with Helidon: Oracle's New Java Microservices Framework
Building Microservices with Helidon:  Oracle's New Java Microservices FrameworkBuilding Microservices with Helidon:  Oracle's New Java Microservices Framework
Building Microservices with Helidon: Oracle's New Java Microservices Framework
Michael Redlich
 
Introduction to Object Oriented Programming & Design Principles
Introduction to Object Oriented Programming & Design PrinciplesIntroduction to Object Oriented Programming & Design Principles
Introduction to Object Oriented Programming & Design Principles
Michael Redlich
 
C++ Advanced Features
C++ Advanced FeaturesC++ Advanced Features
C++ Advanced Features
Michael Redlich
 
Introduction to Object Oriented Programming &amp; Design Principles
Introduction to Object Oriented Programming &amp; Design PrinciplesIntroduction to Object Oriented Programming &amp; Design Principles
Introduction to Object Oriented Programming &amp; Design Principles
Michael Redlich
 
Getting Started with Java
Getting Started with JavaGetting Started with Java
Getting Started with Java
Michael Redlich
 
Building Realtime Access to Data Apps with jOOQ
Building Realtime Access to Data Apps with jOOQBuilding Realtime Access to Data Apps with jOOQ
Building Realtime Access to Data Apps with jOOQ
Michael Redlich
 
Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
Michael Redlich
 
Building Realtime Web Apps with Angular and Meteor
Building Realtime Web Apps with Angular and MeteorBuilding Realtime Web Apps with Angular and Meteor
Building Realtime Web Apps with Angular and Meteor
Michael Redlich
 
Java Advanced Features (TCF 2014)
Java Advanced Features (TCF 2014)Java Advanced Features (TCF 2014)
Java Advanced Features (TCF 2014)
Michael Redlich
 
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Michael Redlich
 
Getting Started with Meteor (TCF ITPC 2014)
Getting Started with Meteor (TCF ITPC 2014)Getting Started with Meteor (TCF ITPC 2014)
Getting Started with Meteor (TCF ITPC 2014)
Michael Redlich
 
Getting Started with Java (TCF 2014)
Getting Started with Java (TCF 2014)Getting Started with Java (TCF 2014)
Getting Started with Java (TCF 2014)
Michael Redlich
 
Getting Started with C++ (TCF 2014)
Getting Started with C++ (TCF 2014)Getting Started with C++ (TCF 2014)
Getting Started with C++ (TCF 2014)
Michael Redlich
 
C++ Advanced Features (TCF 2014)
C++ Advanced Features (TCF 2014)C++ Advanced Features (TCF 2014)
C++ Advanced Features (TCF 2014)
Michael Redlich
 
Getting Started with MongoDB (TCF ITPC 2014)
Getting Started with MongoDB (TCF ITPC 2014)Getting Started with MongoDB (TCF ITPC 2014)
Getting Started with MongoDB (TCF ITPC 2014)
Michael Redlich
 
Getting Started with MongoDB
Getting Started with MongoDBGetting Started with MongoDB
Getting Started with MongoDB
Michael Redlich
 
Getting Started with Meteor
Getting Started with MeteorGetting Started with Meteor
Getting Started with Meteor
Michael Redlich
 

More from Michael Redlich (19)

Getting Started with GitHub
Getting Started with GitHubGetting Started with GitHub
Getting Started with GitHub
 
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
Building Microservices with Micronaut:  A Full-Stack JVM-Based FrameworkBuilding Microservices with Micronaut:  A Full-Stack JVM-Based Framework
Building Microservices with Micronaut: A Full-Stack JVM-Based Framework
 
Building Microservices with Helidon: Oracle's New Java Microservices Framework
Building Microservices with Helidon:  Oracle's New Java Microservices FrameworkBuilding Microservices with Helidon:  Oracle's New Java Microservices Framework
Building Microservices with Helidon: Oracle's New Java Microservices Framework
 
Introduction to Object Oriented Programming & Design Principles
Introduction to Object Oriented Programming & Design PrinciplesIntroduction to Object Oriented Programming & Design Principles
Introduction to Object Oriented Programming & Design Principles
 
C++ Advanced Features
C++ Advanced FeaturesC++ Advanced Features
C++ Advanced Features
 
Introduction to Object Oriented Programming &amp; Design Principles
Introduction to Object Oriented Programming &amp; Design PrinciplesIntroduction to Object Oriented Programming &amp; Design Principles
Introduction to Object Oriented Programming &amp; Design Principles
 
Getting Started with Java
Getting Started with JavaGetting Started with Java
Getting Started with Java
 
Building Realtime Access to Data Apps with jOOQ
Building Realtime Access to Data Apps with jOOQBuilding Realtime Access to Data Apps with jOOQ
Building Realtime Access to Data Apps with jOOQ
 
Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
Building Realtime Access Data Apps with Speedment (TCF ITPC 2017)
 
Building Realtime Web Apps with Angular and Meteor
Building Realtime Web Apps with Angular and MeteorBuilding Realtime Web Apps with Angular and Meteor
Building Realtime Web Apps with Angular and Meteor
 
Java Advanced Features (TCF 2014)
Java Advanced Features (TCF 2014)Java Advanced Features (TCF 2014)
Java Advanced Features (TCF 2014)
 
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
Introduction to Object-Oriented Programming & Design Principles (TCF 2014)
 
Getting Started with Meteor (TCF ITPC 2014)
Getting Started with Meteor (TCF ITPC 2014)Getting Started with Meteor (TCF ITPC 2014)
Getting Started with Meteor (TCF ITPC 2014)
 
Getting Started with Java (TCF 2014)
Getting Started with Java (TCF 2014)Getting Started with Java (TCF 2014)
Getting Started with Java (TCF 2014)
 
Getting Started with C++ (TCF 2014)
Getting Started with C++ (TCF 2014)Getting Started with C++ (TCF 2014)
Getting Started with C++ (TCF 2014)
 
C++ Advanced Features (TCF 2014)
C++ Advanced Features (TCF 2014)C++ Advanced Features (TCF 2014)
C++ Advanced Features (TCF 2014)
 
Getting Started with MongoDB (TCF ITPC 2014)
Getting Started with MongoDB (TCF ITPC 2014)Getting Started with MongoDB (TCF ITPC 2014)
Getting Started with MongoDB (TCF ITPC 2014)
 
Getting Started with MongoDB
Getting Started with MongoDBGetting Started with MongoDB
Getting Started with MongoDB
 
Getting Started with Meteor
Getting Started with MeteorGetting Started with Meteor
Getting Started with Meteor
 

Recently uploaded

Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
QuickwayInfoSystems3
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
vrstrong314
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 

Recently uploaded (20)

Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Enterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptxEnterprise Software Development with No Code Solutions.pptx
Enterprise Software Development with No Code Solutions.pptx
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Nidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, TipsNidhi Software Price. Fact , Costs, Tips
Nidhi Software Price. Fact , Costs, Tips
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 

C++ Advanced Features

  • 1. 1 C++ Advanced Features Trenton Computer Festival March 18, 2017 Michael P. Redlich @mpredli about.me/mpredli/
  • 2. Who’s Mike? • BS in CS from • “Petrochemical Research Organization” • Java Queue News Editor, InfoQ • Ai-Logix, Inc. (now AudioCodes) • Amateur Computer Group of New Jersey 2
  • 3. Objectives • Overloaded Operators • Templates • Exception Handling • Namespaces • Introduction to the Standard Template Library (STL) 3
  • 5. What are Overloaded Operators? • Define basic operations for objects of user- defined types • as if they were built-in types • Often referred to as “syntactic sugar” 5
  • 6. 6 // String.h - a simple string class class String { private: char *string; public: String(char const *str) { string = new char[strlen(str) + 1]; strcpy(string,str); } ~String(void) { delete[] string; } char *getString(void) const { return string; } };
  • 7. 7 // main application #include “String.h” // create two different objects of type String String string1 = “Hello, C++ Users Group!”; String string2 = “Hello, Java Users Group!”; // a conditional *without* an overloaded equality operator if(strcmp(string1.getString(),string2.getString()) == 0) // do this else // do that // a conditional *with* an overloaded equality operator if(string1 == string2) // do this else // do that
  • 8. Overloaded Operators (1) • An overloaded operator has the form: • T [class::]operatorω(paramList) 8
  • 9. Overloaded Operators (2) •string1 == string2 • interpreted as string1.operator==(string2); • string1 is the object in control • string2 is the argument passed into the operator 9
  • 10. 10 // Equality Operator bool string::operator==(string const &s) { return(strcmp( getString(),s.getString()) == 0); }
  • 11. Overloaded Operators (3) • Attractive, but can be dangerous!! • deep vs. shallow copy • assignment operator side effects • The compiler automatically generates an assignment operator if one is not explicitly defined • memberwise assignments 11
  • 12. Overloaded Operators (4) 12 “Hello, C++ Users Group!” “Hello, Java Users Group!” string1.string string2.string
  • 13. 13 // compiler-generated Assignment Operator string &string::operator=(string const &s) { string = s.string; return *this; } // main application string1 = string2;
  • 14. Overloaded Operators (5) 14 “Hello, C++ Users Group!” “Hello, Java Users Group!” string1.string string2.string
  • 15. 15 // user-defined Assignment Operator string &string::operator=(string const &s) { delete[] string; string = new char[strlen(s) + 1]; strcpy(string,s); return *this; } // application string1 = string2;
  • 16. Overloaded Operators (6) 16 “Hello, Java Users Group!” “Hello, Java Users Group!” string1.string string2.string
  • 17. Overloaded Operators (7) 17 Operators Than Can Be Overloaded + - * / % ^ & | ~ ! = < > += -+ *= /= %= ^= &= |= << >> >>= <<= != <= >= && || ++ -- ‘ ->* -> () [] ne w de le te
  • 18. Overloaded Operators (8) 18 Operators That Cannot Be Overloaded . .* :: ?:
  • 19. Overloaded Operators (9) • Limitations: • the meaning of an operator cannot be changed • the number of operands for an operator cannot be changed • operator precedence and associativity cannot be changed • no personal operators!! 19
  • 21. What are Templates? • Used for generic programming • Two kinds: • class templates • member function templates 21
  • 22. Templates (1) • Prototypes: • template <class T> returnType functionName(paramList) {} • template <class T> class className {} 22
  • 23. 23 // swap member functions to handle different data types void swap(int &first,int &second) { int temp = second; second = first; first = temp; } void swap(float &first,float &second) { float temp = second; second = first; first = temp; } void swap(char *&first,char *&second) { char *temp = second; second = first; first = temp; }
  • 24. 24 /* * function template to swap two elements * of any data type */ template <class T> void swap(T &first,T &second) { T temp = second; second = first; first = temp; }
  • 25. Templates (2) • A template specialization is the specific use of a template member function or class • swap<int>(1,2); • swap<float>(1.7,3.5); • swap<char>(‘a’,’b’); • swap<char *>(“Mets”,”Jets”); 25
  • 27. What is Exception Handling? • A more robust method for handling errors than fastidiously checking for error codes • error code checking is tedious and can obscure program logic 27
  • 28. Exception Handling (1) • Throw Expression: • raises the exception • Try Block: • contains a throw expression or a member function that throws an exception 28
  • 29. Exception Handling (2) • Catch Clause(s): • handles the exception • defined immediately after the try block • multiple catch clauses allowed • no implicit data type conversions • catch(...) catches any exception type 29
  • 30. C++ Exception Model • Destructors invoked for all live objects as the stack “unwinds” • Exception Specification • specify what type of exception(s) a member function will throw • Termination vs. Resumption semantics 30
  • 31. 31 // exception handling example #include <string> #include <stdexcept> void fred(void) { FILE *file = fopen(“filename.txt”,”rt”); try { if(file == NULL) { // file could not be opened throw 1; } int g = george(-1); } catch(int e) { cout << “ERROR: Could not open file...” << endl; } catch(string const message) { cout << message << endl; } // other statements... } // continued on next slide...
  • 32. 32 // continued from previous slide... int george(int n) { if(n < 0) { string message = “ERROR: Value less than zero...”; throw message; } // other statements... return n; }
  • 33. C++ Exception Class Hierarchy (1) • exception • logic_error (client program errors) • runtime_error (external errors) • bad_alloc (memory allocation errors) 33
  • 34. C++ Exception Class Hierarchy (2) • exception • bad_cast (dynamic casting errors) • bad_exception (unexpected()) • bad_typeid (RTTI errors) 34
  • 35. 35 // exception handling example (revised) #include <string> #include <stdexcept> void fred(void) { FILE *file = fopen(“filename.txt”,”rt”); try { if(file == NULL) { // file could not be opened throw runtime_error(“ERROR: Could not open file...”); } int g = george(-1); } catch(runtime_error &re) { cout << re.what() << endl; } catch(string const message) { cout << message << endl; } // other statements... }
  • 36. Exception Handling (3) • Do not throw exceptions: • to indicate special return values • in copy constructors and assignment operators • stroustrup.com/3rd_safe.pdf 36
  • 38. What are Namespaces? • Used to prevent global naming conflicts • All C++ standard library components are contained within a single namespace called std 38
  • 39. 39 // an example of using header files from different sources // baseball.h ... int strike = 0; ... // bowling.h ... bool strike = false; ... // main application #include baseball.h #include bowling.h // ERROR: strike already declared
  • 40. 40 // an example of using header files from different sources // baseball.h namespace baseball { ... int strike = 0; ... } // bowling.h namespace bowling { ... bool strike = false; ... } // main application #include baseball.h #include bowling.h // OK!
  • 41. Namespaces (1) • Fully-qualified member names: • namespace name • scope resolution operator (::) • member name • baseball::strike • bowling::strike 41
  • 42. Aliases • Provides shorthand for the fully-qualified namespace name • Has the form: • namespace m = N; • namespace bb = baseball; • namespace bw = bowling; 42
  • 43. Using Directive • Provides access to all members of a namespace without having to write the fully-qualified namespace member names • Has the form: • using namespace N; • using namespace baseball; • using namespace bowling; 43
  • 44. Using Declaration • Provides access to individual members of a namespace without having to write the fully-qualified namespace member names • Has the form: • using N::m; • using baseball::strike; • using bowling::strike; 44
  • 46. What is the STL? • A subset of Standard C++ • First developed by HP Labs in 1994 • Three main parts: • containers • iterators • algorithms 46
  • 47. What are Containers? • A data structure that contains a sequence of elements • Sequential containers: • organize elements linearly • Sorted associative containers: • organize elements based on a key 47
  • 48. Containers (1) • Primarily chosen by how well it can perform certain operations, such as: • add elements to the container • remove elements from the container • rearrange elements within the container • inspect elements within the container 48
  • 49. Containers (2) 49 vector deque list set/map insert O(n) O(n) O(1) O(nlogn) prepend O(n) O(1) O(1) O(nlogn) find O(n) O(n) O(n) O(nlogn) X[i] O(1) O(1) O(n) O(n) pointers 0 1 2 3
  • 50. What are Iterators? • A generalization of a C/C++ pointer • Used to access elements within an ordered sequence • Considered the “glue” that tie together containers and algorithms 50
  • 51. Iterators • Five types: • input • output • forward • bi-directional • random access 51
  • 52. 52 #include <vector> typedef vector<int>::iterator iterator vector<int> v(10); for(int i = 0;i < 9;++i) { v.push_back(i); } iterator current = v.begin(); iterator last = v.end(); while(current != last) { cout << *current << “n”; ++current; } 0 1 2 3 4 5 6 7 8 current last
  • 53. What are Algorithms? • Perform various operations on containers such as: • searching • sorting • transforming 53
  • 54. Algorithms • Non-Mutating • binary_search • count • equal • find • Mutating • copy • generate • remove • reverse • sort 54
  • 55. Popular C++ Compilers 55 • Embarcadero C++ Builder XE7 • embarcadero.com/products/cbuilder • MicrosoftVisual C++ • microsoft.com • Intel System Studio • software.intel.com/en-us/c- compilers
  • 56. Popular C++ Compilers 56 • Open Watcom 1.9 (June 2010) • openwatcom.org
  • 57. Local C++ User Groups • ACGNJ C++ Users Group • facilitated by Bruce Arnold • acgnj.barnold.us 57
  • 58. Further Reading (1) 58 • C & C++ Code Capsules • Chuck Allison • freshsources.com • The C++ Programming Language • Bjarne Stroustrup • stroustrup.com/4th.html
  • 59. Further Reading (2) 59 • The Annotated C++ Reference Manual • Margaret Ellis and Bjarne Stroustrup • stroustrup.com/arm.html • 1997 C++ Public Review Document • C++ ISO JTC1/SC22/WG21 Committee • open-std.org/jtc1/sc22/open/n2356
  • 60. Upcoming Events • ACGNJ Java Users Group • Dr. Venkat Subramaniam • Monday, March 19, 2018 • DorothyYoung Center for the Arts, Room 106 • Drew University • 7:30-9:00pm • “Twelve Ways to Make Code Suck Less” 60
  • 62. Upcoming Events • March 17-18, 2017 •tcf-nj.org • April 18-19, 2017 •phillyemergingtech.com 62