- C++ when compare two char* we can use strcmp(a,b);
if return 0 it means "a=b";
if return <0 means "a<b";
if return >0 means "a>b";
we can't compare two *char with ""==", cause it compare the address of the two objects; - how to printf date like 01:01:02 ?
use printf("%02d",a); - sort(a,a+n,cmp);
cmp(object a,object b){
//write your own rules;
} - when printf keep 2 intrger off the point use%.2f
- radix problem any radix convert10
ans+=ans*radix+Map[i];
we use the vector as a dynamic array
vector<int> a;
a.push_back((int));
a.pop_back();
网友评论