C++C++11C++14C++17Introduction to C++Learn C++

How To find_first_not_of() Or find_last_not_of() In C++ Apps

How can I find a first or last character that is not a character that i am searching in a string? What kind of methods I can use in my C++ apps to find the first character equal to NONE of the characters in the given string in a std::string? How can I use find_first_not_of(), find_last_not_of() methods with strings? Modern C++ usesStrings, Wide Strings, andUnicode Stringsto…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

What You Need To Append One String To Another In A C++ App

How can I use the append() method of std::string? How can I append a string to another string in a C++ app? Can we append a char array to a string? How can I append a number of chars to a string? Is it possible to add a substring of a string to another string? Here are the answers with C++ examples. A little word about C++ strings Generally, as an introduction to C++, in addition to int…
Read more
C++C++17Introduction to C++Language FeatureLearn C++

This Is How To Use Time And Its Properties In C++ Software

How can we use Time when writing C++ software? How can we obtain local time or UTC time in our C++ apps? How can we get each property of a time such hours, mins, seconds? In programming we have two important parameters that we use, which are Date and Time properties. The date and time properties are obtained from a timer or time module such as an RTC DS3231 module which is used on IoTs. The…
Read more
C++C++17Introduction to C++Learn C++

How To Read And Write Text Files In A Modern C++ App

How can I read a text file in a C++ app? How can I write to a text file in C++? How can I append to a text file in C++? How can I use open() method for the ifstream? How can I use open() method for the ofstream? How can I use open() method for the fstream? What is the syntax of ofstream open()? What is the syntax of ifstream open()? What is the syntax of fstream open()? How can I write and read to…
Read more