C/c ++ program written in notepad is executed in Windows.

Source: Internet
Author: User

C/c ++ program written in notepad is executed in Windows.
Zookeeper

1. Create a New 1.cin desktop with the following content:

2. Open the cmd command line window, enter E: \ Installed \ CodeBlocks \ MinGW under the CodeBlock installation directory, and then execute mingwvars. bat

3. Go to the directory where 1.C is located:

4. Execute compilation and other actions

5. Run the code using the VC compiler.

6. Click the command prompt of the VS2013 developer, enter the directory where 1.C is located, and execute 1.c. the result is as follows:

Run the following command: 1. At this time, the same effect will appear as above.

 

 

 


How do I run C language programs written in notepad?

You can install a VC ++ 6.0, which is very useful. You can search for it directly in thunder. That's what I do. You can simply write it in notepad, that is, the *. TXT file. Without an integrated environment, VC can compile your code into a machine identification language to run it. Good luck!

How to run C language programs written in Notepad

1 first, add the MSDev \ Bin and \ VC98 \ Bin paths to the system variables or user variables.
Set the include path: INCLUDE =... \ VC98 \ Include
2. Open a command line window and enter cl to see if the path can be found.
3. Use notepad to create a hello. c program as follows:
# Include <stdio. h>
Int main ()
{
Printf ("Hello world !! ");
Return 0;
}
4. Compile: cl hello. c. We can see that hello.objand hello.exeare generated, and the hello.exe is successfully run!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.