Skip to content

ourfor/My-C-Learning

Repository files navigation

My C++ Learning

Saving the process of my_C++_Language_learning   I am a student who major in Software Engineering in Hunan Normal University. I make this Repository to help me learn C++ language better.  

                               
节次/周次 星期一 星期二 星期三 星期四 星期五
第一节数据结构上机 高等数学(西205) 高等数学(西206)
第二节 C++(西205)
第三节高等数学(西105) 数据结构(西205)离散数学(西206) 大学英语(至205)
第四节
第五节 数据结构(西203) 离散数学(西407) 大学体育
第六节
第七节 近代史(至305)C++上机 大学英语(至205)
第八节
  • Which IDE(integrated development environments) I use? I use CLion and g++, but I often use g++ which isn't a IDE.It is a compiler. As you can see, Visual Studio C++ need about 6G's room. However we need not use all of this tool.
  • Which book I use to learn C++ language? Proclaim: In our class, only me use this book  C++ Prime Plus .
  • You can use macOS and Windows to compile source code. Linux is also a good choice.

Sublime Text 3      

Because I like using Command line and prefer to sample GUI, I use macOS and Ubuntu instead of the popular operation system, Windows. It means that I am not familian with command line in Windows.

At the same time, you can install oh-my-zsh which is useful.(I installed zsh and powerline-theme.)  

macOS and linux platform

As you can see I use Terminal and g++ to compile source code. Here are some detials on how to make a file which includes source code and how to compile it.

Step 1 : make files

Open the Terminal, and enter the following command line

cd ~/Documents     # change directory to "Documents"
mkdir C++_Project   # make directory C++_Project ps. you can rename it
cd ~/C++_Project    # change directory C++_Project
touch xxx.cpp      # make file to save source code Notice: "xxx" is the name of this file , you can name it what you want.

Step 2 : Edit the file you make

In command line, you can use vivim、and nano, I don't like use those. I use Sublime text3and Textmate (I recommanded you install airline if you like using vim)

Step 3 : Compile the source code

Making sure that you have install g++ or gcc, In the Terminal, you can enter this command line gcc -version to know which version you have installed.

Changing directory to where your source code file is. And then use this command line - g++ xxx.cpp to compile source code. The "xxx.cpp" is the name of your source code file.

Then, entering ls,you can see a new file which name is "a.out". Last use command line ./a.out to run it.  

Notice: We use gcc/g++ to compile source code. Some detials is very important.

type extension
C .c
C++ .cpp

You can also download the sources code of gcc and compile it.Sometime the version , which the system installed is too old,and you compile some projects that need heigh version to compile,you can do this.

更多推荐

As for Windows platform

You can install IDE , such as Code::Blocks 、 Qt  

LICENSE

WIKI

古今之成大事业、大学问者,必经过三种之境界:"昨夜西风凋碧树。独上高楼,望尽天涯路。"此第一境也。"衣带渐宽终不悔,为伊消得人憔悴。"此第二境也。"众里寻他千百度,蓦然回首,那人却在灯火阑珊处。"此第三境也。此等语皆非大词人不能道。然遽以此意解释诸词,恐为晏欧诸公所不许也。" ——王国维《人间词话》