inline int Month::getYear(int year)//定义一个年份如:2007,我想提取它的世纪数,提取20世纪。应该怎样?
{
return year;
}
inline void Month::getC()
{
return getYear.substr(2,2);//错在这里,我试过把getYear改成字符串类型也不行的
}
error C2228: left of '.substr' must have class/struct/union type
有人教下吗?

或者用其他方法?
[此贴子已经被作者于2007-6-7 0:56:19编辑过]