C++ running bat commands

I wanna know how to add cmd command by pressing a bottom?
Like:
Bottom 1>Cmd - Wmic

Anny way to do it? Tnks 4 your attention :)
In the future please use somewhat correct spelling. I believe you want to use system commands in cpp. This can be achieved using the system(""); function. For example, to clear the screen:
system("cls");

Now I, along with most people on this forum, will tell you that system is a command to stay away from, as it is windows-dependent. If you are just trying to create a program to run some cmd commands, it is fine, but for other uses you are better off finding a function or api that does what you want.
Last edited on
Topic archived. No new replies allowed.