Writing for beginners :

preparation :

 MinGW( Recommended codeblocks Under directory MinGW folder , Directly available . of course devc++ Etc )


notepad++

step :

1. For this reason, I upload a compiler's compressed package , Unzip to the appropriate folder , Put in English only path !

http://download.csdn.net/download/f_zmmfs/10228543
<http://download.csdn.net/download/f_zmmfs/10228543>


2. Now there are mingw 了 , Then prepare to configure environment variables

record mingw in bin Path to folder



add to path System variable ( Manual Baidu steps for configuration of environment variables )

Don't forget the semicolon , Semicolons are half semicolons in English




Then click three OK

3. Verify configuration succeeded

win+r>>cmd>>g++ -v, be careful g++ and -v Space between .




As shown in the figure , The variable is configured successfully .

4.

download notepad++, And open

Here is a recommended theme

set up 》》 Language formatting 》》 Set and save as shown in the figure




5. get down to business , click notepad++ Operation of menu bar 》》 function

Enter the following :cmd /k cd /d "$(CURRENT_DIRECTORY)" & g++ "$(FILE_NAME)" -o
"$(NAME_PART)" & "$(NAME_PART).exe"




Enter the following :cmd /k cd /d "$(CURRENT_DIRECTORY)" & g++ "$(FILE_NAME)" -o
"$(NAME_PART)" & "$(NAME_PART).exe"

Pay attention to the quotation marks

Click save

Set name and shortcut key



Click the menu bar again to see your compiler , Then you can use the shortcut key directly in the notepad Compiled on

The purpose is to compile some small programs easily and quickly , Instead of waiting for some IDE It took a long time to start .notepad Seconds on .