Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to execute a command and get output of command within C++ using POSIX?
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
#includeusing namespace std; int main () { cout Output
Print string using echo command Hello World Calculate math expression using bc 3.14285714285714285714
Advertisements
