Articles & Books

C++ User Group Meetings in September

The monthly listing of C++ User Group Meetings:

C++ User Group Meetings in September

by Jens Weller

The list of Meetings:

9.9 C++ UG Utah - Regular Monthly Meeting
9.9 C++ UG San Francisco/ Bay area - Presentation and Q&A
9.9 C++ UG Washington, DC - Q & A / Info Sharing 10.9 C++ UG Dresden - Scripting in C++
14.9 C++ UG Denver - Denver Tech Center C++ Developers
14.9 C++ UG Bristol - Tim Perry
14.9 C++ UG Zentralschweiz - Coding Dojo
16.9 C++ UG Düsseldorf - Treffen der C++ User Gruppe NRW
16.9 C++ UG North West/Seattle - The BBC micro: bit and C++
17.9 C++ UG Chicago - "Cross-compiling to C++" and "Can you make me more productive
21.9 C++ UG Austin - North Austin Monthly C/C++ Pub Social
23.9 C++ UG San Francisco/ Bay area - Workshop and Discussion Group
23.9 C++ UG Washington, DC - Q & A / Info Sharing
24.9 C++ UG Rhein-Neckar - C++ Usergroup Meeting
24.9 C++ UG Bremen - C++ - Vorstellung eines Frameworks für den Integrationtest
24.9 C++ UG Arhus - Libreoffice Hackfest
30.9 C++ UG San Francisco/ Bay area - CppCon Trip Report

Handling files in C++ - using boost::filesystem

The 9th installment of my series on writing applications in C++ using Qt and boost:

Handling files - using boost::filesystem

by Jens Weller

From the article:

As part of my data is actual files (images, css, js, files...), I realized that the best way to handle those, would be to just store and load them from the file system. In the UI Qt even offers good support for displaying a folder in an Application with QFileSystemModel. But in the application...

Bitesize Modern C++ : Range-for loops--Glennan Carnie

Today is a description of a C++11 new feature:

Bitesize Modern C++ : Range-for loops

by Glennan Carnie

From the article:

If you’re using container classes in your C++ code (and you probably should be, even if it’s just std::array) then one of the things you’re going to want to do (a lot) is iterate through the container accessing each member in turn.

Without resorting to STL algorithms we could use a for-loop to iterate through the container...

Integrating an HTML Editor into Qt using Javascript and QWebView

Part 8 of my series about writing applications in C++ using Qt and boost:

Integrating an HTML Editor into Qt using Javascript and QWebView

by Jens Weller

From the article:

This time its about integrating an HTML Editor into Qt using QWebView and Javascript! I'll start with text editors in general, and then continue to the integration, based on QWebkit and TinyMCE3. The end result is a little bit of hackery, but it is a working solution...

Easier To Use, And More Expressive--Tony DaSilva

Here is some reasonning of the new standard:

Easier To Use, And More Expressive

by Tony DaSilva

From the article:

One of the goals for each evolutionary increment in C++ is to decrease the probability of an average programmer from making mistakes by supplanting “old style” features/idioms with new, easier to use, and more expressive alternatives. The following code sample attempts to show an example of this evolution from C++98/03 to C++11 to C++14...

Messaging and signaling in C++

The 7th part of my series on writing applications in C++ using Qt and boost:

Messaging and Signaling in C++

by Jens Weller

From the article:

This time it is about how to notify one part of our application that something has happened somewhere else. I will start with Qt, as it brings with signals and slots a mechanism to do exactly that. But, as I have the goal not to use Qt mainly in the UI Layer, I will also look on how to notify other parts of the application, when things are changing.

Foreign Constructors--Gerard Meier

A nice technique to initialize complex objects simply with one constructor:

Foreign Constructors

by Gerard Meier

From the article:

Recently I found myself extending a game engine with font rendering support. Fonts have a lot of properties, so naturally I created a tidy structure to hold all parameters. Whenever drawing a piece of text: I'd simply pass this structure along.

A philosophy I follow, is one of programmer convenience. For example: I always specify default values; when you instantiate a class without any parameters, it is directly usable. Following from that, whenever you call an method or constructor - you should not have to specify not used parameters. This adds a practical issue: it requires all kinds of constructors...

 

Bitesize Modern C++: std::initializer_list--Glennan Carnie

Do you know how to use initializer lists?

Bitesize Modern C++: std::initializer_list

by Glennan Carnie

From the article:

An aggregate type in C++ is a type that can be initialised with a brace-enclosed list of initialisers. C++ contains three basic aggregate types, inherited from C:

  • arrays
  • structures
  • unions

Since one of the design goals of C++ was to emulate the behaviour of built-in types it seems reasonable that you should be able to initialise user-defined aggregate types (containers, etc.) in the same way...

QWidgets and data

The sixt part of my series takes a look at QWidgets and how to exchange data:

QWidgets and data

by Jens Weller

From the article:

The sixt part of my series about writing applications in C++ using Qt and boost is about my thoughts on widgets and how to interact with data from them.