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

This Is How To Get A Substring of a Wide String in C++

How can I usesubstr()method ofstd::wstring? How can I get a substring of a wide string? Here are the answers with C++ examples. Generally, as an introduction to C++, in addition to int, float, double there is another data type calledwstringthat we use for alphanumeric variables. In C++ there are several typedefs of common character types are provided: String types…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

You Need To Know How To Correctly Remove Characters From C++ Strings

How can I correctly remove a character from a string? How can I use pop_back() method in strings? Can I use erase() and resize() methods in std::string to remove characters? Modern C++ usesStrings, Wide StringsandUnicode Stringsto support worldwide languages.Strings (std::string)usescharas the character type which means they are ASCII chars and…
Read more
C++C++11C++14C++17Introduction to C++Learn C++Syntax

Learn To Use The Multi-Talented Printf() Function In C++

The Printf function is one of the oldest and most powerful function that we use to print out strings or that we use to print out to a stream or to another string. Do you want to learn basics of printf() function? Who says you can’t use printf() in Modern C++? Who says printf() is oldish ? 🙂Before we use cout cin in C++ (actually I don’t use them in my Modern Apps), we were using…
Read more
C++C++11C++14C++17Introduction to C++Learn C++

Learn To Use Wide Strings (wstring) In C++

What is wstring? How can we use wide strings? What is difference between string and wstring? Generally in Introduction to C++ lessons, examples are started with string examples and ends with them, while the Modern C++ uses Wide Strings and Unicode Strings to support worldwide languages. In C++ there are several typedefs for common character types are provided: String types are defined in…
Read more