Home > Articles > Programming > C/C++

C/C++

362 Items

Sort by Date | Title

Programming: Principles and Practice Using C++: Vectors and Arrays
May 29, 2014
This chapter from Bjarne Stroustrup's Programming: Principles and Practice Using C++, 2nd Edition describes how vectors are copied and accessed through subscripting.
Put on Your Sorting Hat: Which Algorithm Makes Your Sort 500 Times Faster?
May 27, 2014
Are you in a hurry? Brian Overland explains how to speed up your program's sorting capabilities by specifying the right type of sort for each occasion. Is your sort type fast to program but pokey to run? Zippy but a space hog? Learn why one algorithm is speedier than another—potentially hundreds of times faster!
Safety in Numbers: Introducing C++14's Binary Literals, Digit Separators, and Variable Templates
May 14, 2014
Danny Kalev highlights three new core features in C++14 that simplify the design and implementation of numeric apps. Binary literals such as 0b10101 enable you to parse binary numbers without the onus of converting them to decimal; the new digit separator improves code readability; and, finally, variable templates let you define parameterized constants instead of resorting to cumbersome static member functions.
Regular Expressions 102: Text Translation in C++
May 7, 2014
With the new Regular Expression library in the C++11 specification, you can perform complex text translation simply by specifying a couple of text patterns and then just calling a function. Brian Overland, author of C++ for the Impatient, demonstrates how easy and yet powerful these features are to use.
Preface to Bjarne Stroustrup's Programming: Principles and Practice Using C++, 2nd Edition
May 5, 2014
Bjarne Stroustrup introduces the second edition of his book, Programming: Principles and Practice Using C++, which will give you a solid foundation for writing useful, correct, maintainable, and efficient code.
Exception Management in C++ and Python Development: Planning for the Unexpected
May 1, 2014
Stephen B. Morris digs deeper into the terrain between C++ and Python, both of which provide powerful exception-management facilities. Later maintainers of your code will thank you for implementing decent exception logic! In addition to the maintenance advantages, careful use of exception handlers can facilitate effective integration between Python and C++.
Accessing Shared Atomic Objects from within a Signal Handler in C
Apr 24, 2014
Robert C. Seacord, author of Secure Coding in C and C++, Second Edition, describes how accessing shared objects in signal handlers can result in race conditions that can leave data in an inconsistent state. Historically, the only conforming way to access a shared object from a signal handler was to read from or write to variables of type volatile sig_atomic_t. With the advent of C11, atomics are now a better choice for accessing shared objects in signal handlers.
Preface to The CERT® C Coding Standard, second edition
Mar 26, 2014
Robert Seacord introduces the second edition of The CERT® C Coding Standard: 98 Rules for Developing Safe, Reliable, and Secure Systems, which provides rules for coding in the C programming language safely, reliably, and securely.
Protect C++ Legacy Programs by Using Python
Feb 11, 2014
Stephen B. Morris illustrates a simple way to execute C++ programs by using Python. This approach is lightweight and yet robust, taking advantage of Python's powerful exception-management facilities. Learn how to achieve deeper integration between C++ and Python, while addressing important design issues.
Data and the C Programming Language
Dec 20, 2013
This chapter explores the two great families of data types: integer and floating point. C offers several varieties of these types. This chapter tells you what the types are, how to declare them, and how and when to use them. Also, you discover the differences between constants and variables.
The Components of a C Program
Nov 18, 2013
In this lesson you will learn the components of a short C program, the purpose of each program component, and how to compile and run a sample program.
An Overview of C++ and Java Facilities and Techniques for Defining Classes
Sep 24, 2013
This chapter from Object-Oriented Computation in C++ and Java: A Practical Guide to Design Patterns for Object-Oriented Computing covers the choices we face among language facilities that have duplicate or overlapping functionality, the background of various traditions in C++ and Java programming, and established principles of good programming practice as they apply to building and using object-oriented classes.
Preface to Bjarne Stroustrup's "A Tour of C++"
Sep 11, 2013
Bjarne Stroustrup, the designer and original implementer of C++, introduces his new book, A Tour of C++, which is intended to give an experienced programmer—in as short a time as possible—a clear idea of what constitutes modern C++.
The Absolute Beginner's Guide to Writing Your First C Program
Aug 22, 2013
This chapter introduces you to your first C program, your first function, and teaches you to identify different kinds of data used in programs.
Be Smart About C++11 Smart Pointers
Jul 9, 2013
Smart pointers are an improved, more reliable way to manage resources such as dynamically allocated memory and file handles. Brian Overland, author of C++ for the Impatient, explores the advantages - and hazards - of using smart pointers in your code.
A Primer on Object-Oriented Concepts
Jul 8, 2013
Programming Expert Jesse Smith shows you how valuable understanding object oriented concepts are to facilitate good code design.
C Secure Coding Rules: Past, Present, and Future
Jun 26, 2013
CERT’s Secure Coding Initiative has been developing secure coding standards since 2006. Expert programmer Robert C. Seacord, author of Secure Coding in C and C++, Second Edition, offers a history of this effort, provides detailed information about the ISO/IEC TS 17961 C Secure Coding Rules Technical Specification currently making its way through the standardization process, and discusses the future of these coding standards.
C++11 Regular-Expression Library
Jun 25, 2013
C++11 makes the capabilities of regular expressions directly available to you, without your having to write a regular-expression engine yourself. In this chapter from C++ for the Impatient, Brian Overland explains all the basic functionality so you can learn how to do just about anything you’d want to do.
Regular Expressions 101: Regex in C++11
Jun 10, 2013
Brian Overland, author of C++ for the Impatient, speeds through the basics of regular expression grammar as groundwork for explaining how C++11 regular expressions work.
Introduction to C Programming
Jun 3, 2013
The C language facilitates a structured and disciplined approach to computer-program design. In this chapter Paul Deitel and Harvey Deitel introduce C programming and present several examples that illustrate many important features of C, including simple input and output statements, fundamental data types, and arithmetic operators.

< Prev Page 1 2 3 4 5 Next >