定义变量时你是否会刻意的对齐代码
你喜欢这样:
int a;
double b;
char *pStr;
std::vector<int> arrInt;
std::vector<std::string> arrStr;
std::map<std::string> mapStr;
还是这样:
int a;
double b;
float c;
float d;
char *pStr;
std::vector<int> arr;
std::vector<std::string> arrStr;
std::map<std::string> mapStr;
我喜欢第一种,只是当某个类型过长时,其他则可以不和他看齐,例如这样:
int a;
double b;
float c;
float d;
char *pStr;
std::vector<int> arrInt;
std::vector<std::string> arrStr;
std::map<std::string> mapStr;
各位呢
[解决办法]
你不说,我还真没注意。
应该类似第二种吧。
[解决办法]
对齐能对齐的所有元素!
int a ;double b ;char * pStr;std::vector<int > arrInt;std::vector<std::string> arrStr;std:: map<std::string> mapStr;
[解决办法]
不会
[解决办法]
在看到2L之后,我以为LZ是来消遣别人的,害我看了好久都看不出两种格式的不同。
int a;double b;float c;float d;char *pStr;std::vector<int> arrInt;std::vector<std::string> arrStr;std::map<std::string> mapStr;
[解决办法]