The above field is supplemented with consent to receive a newsletter containing information and marketing content about the cppstories.com portal from Bartłomiej Filipek codebf based in Krakow. The consent may be withdrawn at any time. See the full Privacy Policy.
You want to transform one file into another, input into output. What API will you choose on Windows? WinApi? C++ Streams or good old stdio?
Last year in September I looked at four ways of processing a file on Windows. Also, I did some performance tests.
The whole project description was recently published in Visual Studio Magazine.
There are probably billions of lines of code written in C++ already. New code is being written every day. But will this trend continue? Will you be able to find a C++ job in five years?
Let’s have a quick view.
The Story This post was motivated by a recent video from J.
One of the guidelines from Modern C++ is to avoid using raw new and delete. Instead, you should use a smart pointer, a container or other RAII object. Today I’d like to focus on so-called ‘sink functions’ that takes ownership of input parameters. How can we modernize code around such calls?
C++ is a surprising language. Sometimes, simple things are more complex in practice. In my article about “use const all the time”, I argued that in function bodies const should be used most of the time. But two cases were missed: when moving and when returning a value. Let’s revise this topic today.
Another year and another C++ Status! It’s hard to believe, but it’s my fifth time I am writing this summary. And, as usually, C++ language is very alive. The biggest news for the year?
Of course, it must be: the final draft for C++17!.
What else have happened? See my full report below.
Another year of blogging! Was it good or bad? What’s the plan now? What were the most popular posts?
First of all, please answer those quick questions: Bartek’s Coding Blog in 2016
The Story Keeping things short I’d like to point out four major things that happened this year:
As you might already know, I work remotely. That’s why I try to follow and read guidelines/articles that relate to that style of working. Recently, I got very curious when I saw a new book called “Async Remote” from the Arkency team. Let’s see what it offers.
Warning: the book is not only about remote!
In June I’ve listed 11 tips that can save your time when doing debugging. As it appears, the article wasn’t that horrible :) I got a chance to update the content, extend the text and publish it on Visual Studio Magazine!
Instead of original 11, there are now 9 separate articles:
I must confess that, over the last few years, I’ve become somewhat obsessed with the idea of making all variables const. Whenever I declare a variable within a function body, I consider whether I can make it constant. Here’s why I believe you should adopt the same approach.
I wrote this blog post in 2016 and refreshed it in 2023.
Variadic Templates from C++11 is probably not a feature that you use on a daily basis. But recently, I’ve come across one refactoring example where I’ve decided to give a try and apply variadics.
Intro When I was doing some work in some old UI code I’ve noticed several similar lines of code that looked like that:
Some time ago I covered how to use custom deleters with smart pointers. The basic idea is to specify a dedicated method that will be called when a pointer is released. One logical application of custom deleters might be resource handles like files or the WinApi HANDLE type.
Let’s see how can we implement such thing.
It’s summer! Hmm… actually it’s summer for almost one month now. This time, I don’t want to write about something heavy and related to programming. Let’s make a little summary of the first part of the year.. and also, I have a question to you - can you help me a bit?