I'm trying to re-write some of my shell scripts with C++ and I want to use some Unix commands, but I don't really get how, all the information on System() is just confusing to me...so any help would be great,
>all the information on System() is just confusing to me
It's just a command interpreter. Pass it a string just like you would your shell and things will happen. :rolleyes: Intuitively, system is one of the simplest functions.
If your commands produce output consider using popen() which works like somewhat system() but allows one-way communication between the shell and the C program.
system expects the memory address of an array af characters. Your code is not valid C++ syntax. You could write system("echo 9"); . Or you could use a stringstream to build a string dynamically.
std::ostringstream s("");
int x(9);
s << "echo " << x;
std::system(s.str().c_str());
APLX is a very complete implementation of the APL programming language from MicroAPL. The company stopped producing it in 2016 and it has been taken over by Dyalog. While Dyalog ...