Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

How do I catch a Ctrl+C event in C++?

Nishtha Thakur
Answered 1d 11h ago

The CTRL + C is used to send an interrupt to the current executing task. In this program, we will see how to catch the CTRL + C event using C++.The CTRL + C is one signal in C or C++. So we can catch by signal catching technique. For ... Read More

How do I terminate a thread in C++11?

Smita Kapse
Answered 1d 11h ago

Here we will see, how to terminate the threads in C++11. The C++11 does not have direct method to terminate the threads.The std::future<void> can be used to the thread, and it should exit when value in future is available. If we want to send a signal to the thread, but ... Read More

Using G++ to compile multiple .cpp and .h files

Anvi Jain
Answered 1d 11h ago

To compile multiple files like file_name.h, or file_name.cpp at once, we can use the files like a list one after another. The syntax will be like this −g++ abc.h xyz.cppTo run the program, we can use this −./a.outExamplefloat area(float r){    return (3.1415*r*r); //area of a circle } float area(float ... Read More

How to include libraries in Visual Studio 2012?

Nishtha Thakur
Answered 1d 11h ago

To add libraries in Visual Studio 2012, there are two different methods. The first one is manual method. The second one is adding libraries from code.Let us see the manual method first.To add some library, we have to follow these five steps −Add the #include statements necessary files with proper ... Read More

Floating point comparison in C++

Smita Kapse
Answered 1d 11h ago

Here we will see how to compare two floating point data using C++. The floating point comparison is not similar to the integer comparison.To compare two floating point values, we have to consider the precision in to the comparison. For example, if two numbers are 3.1428 and 3.1415, then they ... Read More

What exactly is nullptr in C++?

Anvi Jain
Answered 1d 11h ago

In this section we will see the nullptr in C++. The nullptr denotes the pointer literals. It is a prvalue of type std::nullptr_t. It has implicit conversion property from nullptr to null pointer value of any pointer type and any pointer to member type. Let us see one program, to ... Read More

How do I convert between big-endian and little-endian values in C++?

Nishtha Thakur
Answered 1d 11h ago

Here we will see how to convert Little endian value to Big endian or big endian value to little endian in C++. Before going to the actual discussion, we will see what is the big endian and the little endian?In different architectures, the multi-byte data can be stored in two ... Read More

When should I write the keyword 'inline' for a function/method in C++?

Smita Kapse
Answered 1d 11h ago

In C++, the inline keyword is used in different places. To create inline variables, or inline namespace, and as well as to create inline methods or functions.C++ inline function is powerful concept that is commonly used with classes. If a function is inline, the compiler places a copy of the ... Read More

Is there a difference between copy initialization and direct initialization in C++?

Anvi Jain
Answered 1d 11h ago

The Copy initialization can be done using the concept of copy constructor. As we know that the constructors are used to initialize the objects. We can create our copy constructor to make a copy of some other object, or in other words, initialize current object with the value of another ... Read More

What is the effect of extern “C” in C++?

Nishtha Thakur
Answered 1d 11h ago

The extern “C” keyword is used to make a function name in C++ have the C linkage. In this case the compiler does not mangle the function. Let us see what is the mangling in C++ first, then we can discuss about the extern “C” keyword.In C++ we can use ... Read More

What is the difference between const int*, const int * const, and int const *?

Smita Kapse
Answered 1d 11h ago

Here we will see some different types of variable declaration based on integer pointers integer constants and the integer constant pointers.To determine them we will use the Clockwise/Spiral Rule. By discussing the terms, we can understand the rules also.The const int *. This is used to tell the compiler that ... Read More

What is the most effective way for float and double comparison in C/C++?

Anvi Jain
Answered 1d 11h ago

Here we will see how to compare two floating point data or two double data using C or C++. The floating point / double comparison is not similar to the integer comparison.To compare two floating point or double values, we have to consider the precision in to the comparison. For ... Read More

What's the best way to trim std::string in C++?

Nishtha Thakur
Answered 1d 11h ago

Here we will see how to trim the strings in C++. The trimming string means removing whitespaces from left and right part of the string.To trim the C++ string, we will use the boost string library. In that library, there are two different methods called trim_left() and trim_right(). To trim ... Read More

What is a null-terminated string in C/C++?

Smita Kapse
Answered 1d 11h ago

In C the strings are basically array of characters. In C++ the std::string is an advancement of that array. There are some additional features with the traditional character array. The null terminated strings are basically a sequence of characters, and the last element is one null character (denoted by ‘\0’). ... Read More

The best way to hide a string in binary code in C++?

Anvi Jain
Answered 1d 11h ago

Here we will see how to hide some string into some binary code (Here binary code is represented in hexadecimal number).The approach is very simple. We can use the string stream to convert decimal number to hexadecimal numbers. Now from the string, we will read each character, and take its ... Read More

Previous 1 ... 3 4 5 6 7 8 9 ... 1346 Next
Advertisements
Loading...
Unanswered Questions View All

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.