can i access cmd command from cpp? for example, C://Program Files/asdf.exe

Do you mean you want to execute commands such as dir from within your C/C++ program? Sure.

system("dir");

Just change dir to the name/location of any program you want. The output will go to the screen though, not back to your program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.