C++C++11C++14C++17Learn C++

What You Need To Know About std::basic_string In Modern C++

What is basic_string in modern C++? How can I use basic_string in C++? Is std::basic string same as std::string? What is basic_string? The basic_string (std::basic_string and std::pmr::basic_string) is a class template thatstores and manipulates sequences ofalpha numeric string objects (char,w_char,…). For example str::string and std::wstring are the data type that defined…
Read more
C++Introduction to C++Learn C++

Learn to Use Strings in C++

In C programming language ASCII codes are used as in char arrays to store texts in ASCII mode. You can use char arrays in both C and C++, they are faster in operations and they have less memory usage. In s modern way, strings are useful for storing texts and they are defined…
C++C++11C++14C++17Code SnippetLanguage FeatureLearn C++

Quickly Learn To Search And Count Words From A Text File In Modern C++

C++ Builder is easy to operate on files on Windows. There are many methods to operate on files. Some of these methods are explained well in Windows File Operations in Modern C++. In this post we create a snippet to search and count a text from a text file. unsigned int count_text(UnicodeString text, UnicodeString filename) { if(FileExists(filename)) { UnicodeString us; unsigned int…
Read more
C++C++11C++14C++17Language FeatureLearn C++Syntax

Unicode Strings in C++ On Windows

Unicode standard for UnicodeString provides a unique number for every character (8, 16 or 32 bits) more than ASCII (8 bits) characters. UnicodeStrings are being used widely because of support to languages world wide and emojis. In modern C++ nowadays there are two types of strings used; array of chars (char strings) and UnicodeStrings (WideStrings and AnsiStrings are older, not compatible with…
Read more