codice:#include <shellapi.h> /* Importante: linkare con shell32.lib */ /* ... */ if(ShellExecute(NULL,"open","c:\nomefile.doc",NULL,NULL,SW_SHOWNORMAL)<=32) puts("Errore, impossibile aprire il file."); /* ... */
codice:#include <shellapi.h> /* Importante: linkare con shell32.lib */ /* ... */ if(ShellExecute(NULL,"open","c:\nomefile.doc",NULL,NULL,SW_SHOWNORMAL)<=32) puts("Errore, impossibile aprire il file."); /* ... */
Amaro C++, il gusto pieno dell'undefined behavior.