一 C++概述 C++历史背景 )C++的江湖地位 jave C C++ C# python )C++之父:Bjarne Stroustrup(--) ,Cpre,为C语言增加类的机制 ,Bjarne发布了全新的编程语言C with Class ,CFront1.<The C++ programming Language> )C++发展过程 ,GNU C++ ,Borland C++(BC编译器) ,Microsoft C++(VC) ,ISO C++ ,对C++98进行修订,C++ ,ISO…
struct Person { public int age; public string name; public string fname; public string class; } enum Days {Monday,Tuesday,Wednesday}; Person person = new Person(); person.age = 10; Console.WriteLine(person.age); var day = Days.Monday; Console.Write…
Sometimes, if we want to do convert between two enums, firstly, we may think about one way: var myGender = (MyGender)(int)TheirGender.TheirMale; Obviously, it's dangerous, if the int value of TheirMale in TheirGender doesn't match corresponding MyGen…
1.1 变量 Go 是静态类型语言,不能在运行期改变变量类型.使用关键字 var 定义变量,自动初始化为零值.如果提供初始化值,可省略变量类型,由编译器自动推断. var x int var f float32 = 1.6 var s = "abc" 在函数内部,可用更简略的 ":=" 方式定义变量. func main() { x := 123 // 注意检查,是定义新局部变量,还是修改全局变量.该方式容易造成错误. } 可一次定义多个变量. var x, y,…
C++ Core Guidelines September 9, 2015 Editors: Bjarne Stroustrup Herb Sutter This document is a very early draft. It is inkorrekt, incompleat, and pµøoorly formatted. Had it been an open source (code) project, this would have been release 0.6. Copy…