Students prepared prevail C / C ++ programming tutorials start MinGW installation and configuration using Notepad ++ c ++ compiler environment

Recently more and more land chiefs in other areas have continued to come to me, "inquiry" method of programming a start, clutching a paper written reply by-one is taking into account the time-consuming many, the two are really not very humble mind always remember the case of missing something easy or clear expression of will.

I hope this tutorial can help you beginners.

1. Related Concepts

If the latter understand what appeared puzzled jump back and see :)

A. editor / compiler / IDE / development environment

Edited editing device refers to typing your tool (millet as Notepad or notes), compiled translation device is used to your code from simple text conversion program for the tool.

First you need to use input editor section of the code, and then save it as a suffix corresponding to the language file, and then use the compiler it compiled into machine can understand machine code (ie exe program), and finally run the exe program

Edit -> compile -> run

More famous editors have Notepad ++, Vim and Emacs, Windows comes with Notepad can be used, really, but millet notes on ,,,,, 

The compiler usually we use the G ++ and GCC (which is now in the sense that the former is included), you just need to know there is such a thing can be, it is never quite found the back of.

IDE ( Integrated Development Environment  )  is the integrated development environment (but we used to call IDE) , we can now understand as he put the editor and compiler integration, and other useful stuff together to facilitate the development.

Development environment is a more casual concept, since I believe that this concept is very casual so I began to suspect that he is not really know what it was .... I might very irresponsible to say that "it is probably that way."

B. C++ / C

The difference is really not that big ... C ++ grew out of C and C and their own expertise, but these are really no different for beginners. C and C ++ syntax specification is almost exactly the same, but you look next door Python ....

1 #include<stdio.h>
2 int main(){
3     printf("Hello,World!");
4     return 0;
5 }
C version of Hello world
1 #include<cstdio>
2 int main(){
3     printf("Hello,World!");
4     return 0;
5 }
C ++ version of Hello world
1 #include<cstdio>
2 #include<iostream>
3 using namespace std;
4 int main(){
5     cout << "Hello, World!";
6     return 0;
7 }
Another of C ++ Hello World
1 print('Hello World!')
Python version of Hello world

So please do not over-tangle problems between the C and C ++, that is up to the accent is not the same as it ...

C. Win key / CMD 

Win key (lower left)

CMD (on the right), the command prompt, the command line is the same thing, from a previous DOS, so if you want to specialize in this case can Baidu DOS commands or enter a Help in the CMD

In fact, we talked about the programming behind the black window with CMD deep relationship ...

If you intend to use the editor and compiler manually create an IDE, then you will know that in fact they are the same thing ... 

D. Process oriented / object-oriented

Process-oriented C, object-oriented C ++ and Java, which is actually a language features for beginners really does not matter (to me also yet not feel any difference in fact). If someone have to blow forced to ignore this just fine.

E. Primer / distal / full stack / Assembly

C is actually very close to the compiled language, the language at three levels: high-level language / assembler language / machine language

High-level language is C / C ++ / Java language these posters, also known as machine language machine code, binary language 0001110101011100101010 these, to look at the machine, the machine can run direct language.

The reverse is the development of computer programming languages ​​(assembly language ... so those who are interested Baidu or B station to find SHENZHEN I / O, it is a very good compilation of relevant games).

C language bottom of living compared to other languages closer to the essence of the computer (false). A project can actually be composed of a variety of modules interconnected through an interface between them to transmit information and each module written by the most appropriate language, such as data processing section refers to the core can be written in C language, relatively fast, comes to see the user interface (GUI) can be written in Java (standard black window of the C language is really ugly, Java graphics programming okay good), appears to be slow

So the front ... probably understand What do you mean it! There corresponds to a back-end. Front and rear ends is a conceptual page programming, the front end may be approximately understood that the user can see the part of the rear end portion is not visible ....

Full stack is similar to the person consequently would do, to complete a project alone (like the independent game developers is the full stack engineers, even to write their own music )

 

2. Prepare the development environment

A. simple line: Use the IDE

Of course, we still need an IDE .... That's normal

We use the Dev-c ++: Click here to download DevC ++

Dev c ++ advantage is that it is really convenient ... installation of the GCC will be installed incidentally, so you do not have to worry about installation problems compiler it!

note! On how to set his language! The installation of the selected language English , then the first run when the select Simplified Chinese

Interface is like this ...

 

First, a new document (Ctrl + N), and type codes (as above), and then save, and then translated (the F9), and then run (the F10), compiled or run + (F11)

Then there will be the legendary black window appeared

Note: This is the translation of Dev-C ++ will help you to automatically save files, very intimate, if you show up in other IDE after compiling and running the code inconsistent, please remember to save :)

Hello world's first cry is all programmers, bringing your development environment is ready.

B. Lightweight installation difficult route: editor + compiler

First, make sure your computer has a compiler installed (usually not)

We chose MinGW, click on the link to the right Jump: MinGW to install and use

After installing this you can use CMD + Notepad program it!

By the way there will be time to install the Java JDK and JRE two concepts, the former is JDK development environment, the equivalent here of the compiler, which is the JAVA virtual machine for running Java programs

Or you do not want to use Notepad, you want something a little more normal look, such as Notepad ++ / Vim / Emacs (in fact the latter two in the industry is a sign of God, Ben, is generally preferred for Linux systems)

那么首先下载一个Notepad++,下载地址:点我即刻开始下载

然后你需要配置C++开发环境:Notepad++配置c++编译环境

由于这一条路线过于困难,能做到的人肯定自学能力都很强,所以我推荐大佬们自己百度或者来问我 :)

 

3. 继续学习建议

 

编程,不是坐而论道的地方,是实战的地方

  A. 做项目。如果你想做一个特别的礼物给你的小姐姐(别笑)或者想做一个随便什么东西,你只需要:坚定的决心+随时百度+开发环境

  事实上编程就是一个自学的过程,很多业界成功案例都是 有一个想法+边学边干 搞出来的,大家起点真的都没那么高,为了小姐姐加油吧!

  B. 刷题。此处为朴素无华的刷题网站:http://noi.openjudge.cn/

  当然你可以尝试网页设计的更好的网站比如 洛谷 (其实是面对竞赛选手)或者如果你英语不错的话我建议 Hackerrank (面向程序员,印度人开发的,但是确实很棒!)

 

  对你们要开始补以前欠下的债了(笑)

  坚持刷题,当你结束 1.1 ~ 1.13 之后,你的C语言水平就能够吊打大部分人了(甚至包括我因为我并没有做完)

  C. 善用搜索引擎

  如果对题目有任何疑惑随时百度... 然后... 程序员的日常就是在自己写的BUG里面找代码

  请经常输出中间值检测自己的代码到哪一步出现了问题... 或者来问我

 

4. C/C++之外

语言的话,有的人会选择Python,有的人选择Java,有的因为之前做公众号所以接触过一点Html5。其实这些语言真正值得注意的区别不在于语言的写法,而在于语言特性,可能会有什么教程说什么什么语言适合起步,我是觉得其实这些东西区别都不大,毕竟都是英语(误),我还是建议C/C++语言起步,因为我比较懂。因为这毕竟是真正接近底层的东西,学习C语言你可以接触很多计算机内部的东西。但其实你学哪一种都一样,毕竟我们虽然有学单词(相对比编程语言)的必要,但我们言论背后的逻辑(相对比编程中的算法逻辑)才是最重要也最复杂的东西。

如果要学习某些语言的话,一般你都要安装对应的编译器,同时注意Python的2.0和3.0有较大区别不大互相兼容,注意区分

学习各种各样的编程技能我推荐 慕课网 以及 哔哩哔哩弹幕网

这里再推荐一些比较好玩的东西:

A. C/C++语言的话有个库叫Qt库,可以让你用C/C++编写较为酷炫的图形界面

B. 安卓开发的话有个东西叫Android Studio

C. Python开发爬虫是个非常不错的选择~ 爬虫编程了解一下?(爬虫,自动运行用来爬取网上的数据,具体定义百度)

D. 各种开发引擎,比如Unity,虚幻4,不过那些东西体量太大了,我个人在研究Godot,一个开发2D和3D游戏的轻量级游戏引擎

E. Screeps!自己编写AI发展文明!使用Javascript作为编程语言,Steam售价¥65不过有免费的网页版可以玩教程

F. 如果你接触编程比较多的话应该考虑研究一下GitHub!无数程序员都在上面存代码和项目,内容资源均较为优质

G. 当年写过Minecraft的mod..... 有兴趣的同学了解一下

 

5. 后记

当年还没退役的时候就像写了... 被教练批评不务正业好为人师(笑

持续更新,如果你觉得这篇文章有任何不好/需要改进的地方,”面刺寡人者得上赏“,请告诉我!

 

Guess you like

Origin www.cnblogs.com/Chorolop/p/11279779.html