常量是使用 const 关键字来定义的 。定义一个常量的语法如下:
const <data_type> <constant_name> = value;
字符串常量是括在双引号 “” 里,或者是括在 @"" 里。
string a = “hello, world”; // hello, world
string b = @“hello, world”; // hello, world
string c = “hello \t world”; // hello world
string d = @“hello \t world”; // hello \t world