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