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.

Surface Pro (2017) vs Surface Pro 4

20 groundbreaking 3D animation techniques

How to mine Bitcoin on Mac