Relative Content

Tag Archive for pipefork

why there is an error: ‘fork’ was not declared in this scope in my code?

#include <iostream> #include <unistd.h> using namespace std; int main() { int fd[2]; //fd[0] – read //fd[1] -write //declare all the variables int n; int countN; int arr[3]; //prompt for the numbers called n //there are at most 3 nums(use countN to check) while(countN <= 2){ cin >> n; // checked whether the num is from […]