Samual Sam has Published 2492 Articles

How to launch a program using C++ program?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

2K+ Views

Here we will see how to start some third-party application like notepad or anything using C++ program. This program is very simple, we can use command prompt command to do this task.We will pass the application name inside the system() function. This will open it accordingly.Example#include using namespace std; ... Read More

What does buffer flush means in C++ ?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

1K+ Views

The buffer flush is used to transfer of computer data from one temporary storage area to computers permanent memory. If we change anything in some file, the changes we see on the screen are stored temporarily in a buffer.In C++, we can explicitly have flushed to force the buffer to ... Read More

transform() in C++

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

3K+ Views

The transform function is present in the C++ STL. To use it, we have to include the algorithm header file. This is used to perform an operation on all elements. For an example if we want to perform square of each element of an array, and store it into other, ... Read More

Advanced C++ with boost library

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

1K+ Views

C++ boost libraries are widely useful library. This is used for different sections. It has large domain of applications. For example, using boost, we can use large number like 264 in C++.Here we will see some examples of boost library. We can use big integer datatype. We can use different ... Read More

static_cast in C++

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

4K+ Views

The static_cast is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coercion and can also be called explicitly. You should use it in cases like converting float to int, char to int, etc. This can cast related type classes.Example#include using namespace std; ... Read More

The feclearexcept in C++

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

39 Views

The feclearexcept() function is used to clear the supported floating point exceptions represented by the excepts.This function returns 0, if all exceptions are cleared, or the exception value is 0. And returns nonzero value for some exceptions.To use this function, we have to enable the FENV_ACCESS. This will give our ... Read More

What happen when we exceed valid range of built-in data types in C++?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

358 Views

Here we will see what will be the results, if we exceed the range of built-in datatypes in C++. So let us see some examples.First one is the character type data. Here we are using a loop from 0 to 300, so it should print from 0 to 300, then ... Read More

When are Constructors Called in C++?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

550 Views

Here we will see, when constructors are called. Here constructors are of different types. Global, local, static local, dynamic.For the global object, the constructors are called before entering into the main function.Example#include using namespace std; class MyClass {    public:       MyClass() {          cout

How to execute a command and get output of command within C++ using POSIX?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

655 Views

Here we will see how to use the POSIX command through C++. The process is very simple, we have to use the function called system(). Inside this we have to pass string. That string will contain the POSIX command. The syntax is like below.system(“command”)Example#include using namespace std; int main () ... Read More

How to create FileFilter for JFileChooser in Java and display File Type accordingly?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:26

636 Views

To create FileFilter, use the FileNamExtensionFilter class. The following is an example to display File Type in JFileChooser −Exampleimport javax.swing.JFileChooser; import javax.swing.filechooser.FileNameExtensionFilter; public class SwingDemo {    public static void main(String[] args) {       JFileChooser file = new JFileChooser();       file.setAcceptAllFileFilterUsed(false);       FileNameExtensionFilter extFilter ... Read More

Advertisements