iFocus.Life News News - Breaking News & Top Stories - Latest World, US & Local News,Get the latest news, exclusives, sport, celebrities, showbiz, politics, business and lifestyle from The iFocus.Life,

How to Compile a C++ With CMD & CL

104 183
    • 1). Click the Windows "Start" button and type "cmd" in the text box. Press "Enter" to open the MS-DOS command line.

    • 2). Type "cd path" where "path" is the location of your compiler program. For instance, if your compiler is installed in "c:\cplusplus," type "cd cplusplus" and press "Enter." The prompt moves to the directory.

    • 3). Type "cl /EHsc file.cpp" where "file.cpp" is your C++ source code. The compiler uses the CPP file to create an EXE file.

    • 4). Type "file.exe" in the command prompt where "file.exe" is the new file created by the compiler. The compiler automatically names the EXE file the same name as the CPP file. Typing the EXE file into the command prompt runs the code on your computer.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time
You might also like on "Technology"

Leave A Reply

Your email address will not be published.