C++ path names with spaces

  Ironman556 11:25 18 May 05

Hi, I'm trying to write a program to open a file. the file location is "C:\Program Files\MailWasher Pro\MailWasher.exe"

So far I have:

#include iostream.h>
#include iomanip.h>
#include stdlib.h>

int main (void)


system("C:\\Program Files\\MailWasher Pro\\MailWasher.exe");

return 0;


The problem I'm gettting is that when I run it I get the message 'C:\Program' is not recognised as an internal or external command, operable program or batch file. I think this is due to the spaces and I can't change the file location. Can anyone tell me what I need to do for the program to accept the space in the file name?

This thread is now locked and can not be replied to.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Prehistoric Britain is laid out in these Royal Mail stamp illustrations

Best running headphones | Best sport & fitness headphones: 4 brilliant pairs of wireless…