
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 7184 Articles for C++

454 Views
volatile means two things − The value of the variable may change without any code of yours changing it. Therefore whenever the compiler reads the value of the variable, it may not assume that it is the same as the last time it was read, or that it is the same as the last value stored, but it must be read again. The act of storing a value to a volatile variable is a "side effect" which can be observed from the outside, so the compiler is not allowed to remove the act of storing a value; for example, ... Read More

2K+ Views
A type qualifier is a keyword in C++ that is applied to a variable, function, pointer, or parameter to add an extra feature or quality to it. For example, const int is a qualified type representing a constant integer, while int is an unqualified type, which is simply just an integer. Type qualifiers are a way of expressing additional information about a value through the type system, which ensures correctness in the use of the data. 1. The const Qualifier This is used to define a variable (or object) as constant, which means its value cannot be changed or modified ... Read More

4K+ Views
There are several alternatives for compiling C++ on Linux. Let's look at 2 of them −GCCAlmost all Linux distros come with GCC installed. Check whether GCC is installed on your system by entering the following command from the command line −$ g++ -vIf you have installed GCC, then it should print a message such as the following −Using built-in specs. Target: i386-redhat-linux Configured with: ../configure --prefix=/usr ....... Thread model: posix gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)If GCC is not installed, then you will have to install it yourself using the detailed instructions available at https://gcc.gnu.org/install/. clangClang is a compiler developed ... Read More

288 Views
Step 0 − Install MinGW GCC or Cygwin GCCTo use Eclipse for C/C++ programming, you need a C/C++ compiler. On Windows, you could install either MinGW GCC or Cygwin GCC. Choose MinGW if you are not sure, because MinGW is lighter and easier to install, but has fewer features.MinGW GCC − To install MinGW, go to the MinGW homepage, www.mingw.org, and follow the link to the MinGW download page. Download the latest version of the MinGW installation program which should be named MinGW-.exe.While installing MinGW, at a minimum, you must install gcc-core, gcc-g++, Binutils, and the MinGW runtime, but you ... Read More

804 Views
In C++, character literals are the constant values, which are assigned to variables of the character data type. These values are represented by a character enclosed within single quotation marks. There are mainly five types of character literals: Narrow-character literals Wide-character literals. UTF-8 character literals UTF-16 character literals UTF-32 character literals Narrow-character Literals These character literals are of type char, which represents single-byte character. It stores characters from the ASCII table, which includes values ranging from 0 to ... Read More

412 Views
Boolean Literals In C++, Boolean literals are the values, which are assigned to variables of the Boolean data type. A Boolean literal represents two values: true or false, which are internally represented as 1 and 0 respectively. A Boolean literal occupies 1 byte (8 bits) of memory and is used for conditions, flags and logical checks. Declaring Boolean Variables You can declare the boolean variables and assign the boolean literals to them by the given following. In this variable1 and variable2 is assigned with boolean literals true and false respectively in C++. bool variable1 = true; bool variable2 = false; ... Read More

869 Views
In C++, tokens, identifiers, and keywords all are fundamental elements of a program. Tokens are the smallest units of code which are combine together to form complete program, where both keywords and identifiers are the types of tokens. The keywords are reserved words in the language, where each provides separate meanings to code and cannot be used as names by the programmer, whereas identifiers are names defined and used by programmers to represent variables, function or other user-defined elements. In this article, we will learn about all three in detail. Tokens in C++ A token is the smallest element of ... Read More

2K+ Views
A token is the smallest element of a C++ program that is meaningful to the compiler. The C++ parser recognizes these kinds of tokens: identifiers, keywords, literals, operators, punctuators, and other separators. A stream of these tokens makes up a translation unit. Tokens are usually separated by white space.The parser recognizes keywords, identifiers, literals, operators, and punctuators. Preprocessing tokens(like #include, #define, #if_def, etc.) are used in the preprocessing phases to generate the token stream passed to the compiler. The preprocessing token categories are header names, identifiers, preprocessing numbers, character literals, string literals, etc. that do not match one of the ... Read More

5K+ Views
There are several alternatives for compiling C++ on windows. Let's look at 2 of them:GCCTo install GCC on Windows you need to install MinGW. To install MinGW, go to the MinGW homepage, www.mingw.org, and follow the link to the MinGW download page. Download the latest version of the MinGW installation program which should be named MinGW-.exe.While installing MinGW, at a minimum, you must install gcc-core, gcc-g++, Binutils, and the MinGW runtime, but you may wish to install more.Add the bin subdirectory of your MinGW installation to your PATH environment variable so that you can specify these tools on the command ... Read More