Re: [Dev-C++] What is wrong with this code?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
From: Derek C. <de...@ci...> - 2009-05-12 00:41:27
|
Backslash is a special character in C strings, so to use an actual backslash character you need to double it: system("c:\\PTH.exe"); Surely sleep needs round brackets? On Tue, May 12, 2009 at 12:40 AM, Heedle Blambeedle <hee...@gm...> wrote: > #include <iostream> > #include <windows.h> > > using namespace std; > > int main() > { > system("c:\PTH.exe"); > sleep<15000>; > system("c:\BLACK.exe"); > return 0; > } > > returns the error upon compile: > > c:\documents and settings\\my > documents\\projects\shutdown\shutdown\cpp.cpp(8) : warning C4129: 'P' : > unrecognized character escape sequence > c:\documents and settings\\my > documents\\projects\shutdown\shutdown\cpp.cpp(9) : error C2065: 'sleep' : > undeclared identifier > c:\documents and settings\\my > documents\\projects\shutdown\shutdown\cpp.cpp(9) : error C2059: syntax error > : ';' > c:\documents and settings\\my > documents\\projects\shutdown\shutdown\cpp.cpp(10) : warning C4129: 'B' : > unrecognized character escape sequence > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK > i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > |