我在创建一个对象的时候,用到多态
IVSS_Statement *m_stmt;
m_stmt = new CVSS_MysqlStatement((CVSS_MysqlConnection*) m_pConn);
现在我要获得m_stmt;
CVSS_MysqlStatement* getMsmt();
CVSS_MysqlStatement* getMsmt()
{
return (CVSS_MysqlStatement*)m_stmt;
}
而不能写成
IVSS_Statement * getMsmt();
IVSS_Statement * getMsmt()
{
return m_stmt;
}