Preprocessor output of cpp file
Preprocessing is a stage where preprocessor directives are expanded or processed before source code is sent to the compiler. The most common example of such directive is #include or #define. A preprocessor output has “.i” extension....
read more
C++ Programming Basics
C++ is a general-purpose programming language and is widely used nowadays for competitive programming. It has imperative, object-oriented, and generic programming features. C++ runs on lots of platforms like Windows, Linux, Unix, Mac, etc....
read more
Is it fine to write void main() or main() in C/C++?
In C/C++ the default return type of the main function is int, i.e. main() will return an integer value by default. The return value of the main tells the status of the execution of the program. The main() function returns 0 after the successful execution of the program otherwise it returns a non-zero value....
read more
C++ Keywords
C++ is a powerful language. In C++, we can write structured programs and object-oriented programs also. C++ is a superset of C and therefore most constructs of C are legal in C++ with their meaning unchanged. However, there are some exceptions and additions....
read more
How variable length argument works?
In this article, we will discuss how the variable-length argument works....
read more
Similarities and Differences between Ruby and C++
There are many similarities between C++ and Ruby, some of them are: Just like C++, in Ruby…...
read more
C++ Preprocessor And Preprocessor Directives
The preprocessor in C++ is used for processing the code before it is compiled by the compiler. It does many tasks such as including files, conditional compilation, using macros, etc. The preprocessor also allows the developers to select which portions of code should be included or excluded....
read more
Writing First C++ Program – Hello World Example
C++ is a widely used Object Oriented Programming language and is relatively easy to understand. The “Hello World” program is the first step towards learning any programming language and is also one of the most straightforward programs you will learn....
read more
Create a string of specific length in C++
C++ has in its definition a way to represent a sequence of characters as an object of a class. This class is called std::string. String class stores the characters as a sequence of bytes with the functionality of allowing access to the single-byte characters. This article focuses on discussing how to create a string of specific characters with specific lengths in C++. Let’s have a look at the various methods available to get a specific length string with the specific character where the character and the length of the string are taken as user input....
read more
How to speed up g++ during compile time
Fast compilation on g++ build systems is basically used in compiling and executing C++ programs in the terminal. There are many options to speed up the compilation or even slow it down. Some of them are as follows:...
read more
Encrypt and decrypt text file using C++
Encryption in cryptography is a process by which a plain text or a piece of information is converted into ciphertext or a text which can only be decoded by the receiver for whom the information was intended. The algorithm that is used for the process of encryption is known as a cipher. It helps protect consumer information, emails, and other sensitive data from unauthorized access to it and secures communication networks. Presently there are many options to choose from and find the most secure algorithm which meets our requirements....
read more
Difference between cerr and clog
In C++ input and output are performed in the form of a sequence of bytes or more commonly known as streams. cerr and clog both are associated with the standard C error output stream stderr but the cerr is the unbuffered standard error stream whereas the clog is the buffered standard error stream. In this article, we will learn what is the difference between these two streams in detail with examples....
read more