pointer of pointer in a class

I have some trouble of using pointer of pointer in a class
it is from a open source project, drizzle.

The new class is like
class DrizzleLock
{
public:

DrizzleLock(Table **in_table):table(in_table)
{}

Table **getTabke(){ retrun table; }
void setTabke(Table **in_table){ table = in_table; }
private:

Table **table;
}

First, I am not sure if my get/set function is correct here.
Second, when I use the class in some other file,

Do I need to type case sql_lock->getTable()?? when I pass the Table** to
another function?

void mysql_unlock_tables(Session *session, DrizzleLock *sql_lock)
{
if (sql_lock->getTableCount())
unlock_external(session,sql_lock->getTable(),sql_lock->getTableCount());

free((unsigned char*) sql_lock);
return;
}

Thanks for help,
Benjamin
Do I need to type case sql_lock->getTable()?? when I pass the Table** to
another function?
That depends only on what are the argument types for that function.
Did you copy-paste this code from your code? If so, could it be, that you misspelled getTabke? Or did you make that mistake just now?
ops, that is typo when I post it :), thx for checking.

Yeah, so the function,
static int unlock_external(Session *session, Table **table,uint32_t count), has Table **table,

Is that means I need to type cast like this?

unlock_external(session,(Table**)(sql_lock->getTable()),sql_lock->getTableCount());
No typecasting needed here.
What errors is the compiler giving you?
Topic archived. No new replies allowed.