0

Currently I am working on project of Image processing using c++. I found solution which requires use of Command prompt.Can you please tell me syntax of some portion of it?

Since my C++ skills aren't that great I don't know how to achieve this.

DeUs
  • 31
  • 2
  • 9
  • http://stackoverflow.com/questions/8832326/how-can-i-execute-a-command-line-command-from-a-c-program – Joseph Young Nov 08 '16 at 12:32
  • what OS? some compiler/IDEs has linbuild functions to run cmd. You can always start new proccess with cmd.exe or what ever ... and then hook to its handle ... or use pipes etc – Spektre Nov 08 '16 at 12:33
  • I am using windows 7 – DeUs Nov 08 '16 at 12:37
  • It's unclear what you're asking here. Do you want to run a command? Do you want to run a command with a bunch of command line parameters? Do you want to pop up a command prompt window for the user to type in? Do you want to launch a command, pipe the results to a second command, and redirect those results to a file? – David Yaw Nov 08 '16 at 18:04

1 Answers1

0

Try to use system() function:

#include <stdlib.h>

int main(void)
{
  return system("dir");
} 
Ignat
  • 51
  • 1
  • 4