Returning CArray
-
Hi, I have declared int m_intValue; and wrote int GetValue(){ return m_intValue;} function.I have declared a structure struct Table { int intData; CString strName; }; CArraym_Tables; Now i want to write a function same as GetValue() function which will return m_Tables.How to declare it ? thanks in before James
-
Hi, I have declared int m_intValue; and wrote int GetValue(){ return m_intValue;} function.I have declared a structure struct Table { int intData; CString strName; }; CArraym_Tables; Now i want to write a function same as GetValue() function which will return m_Tables.How to declare it ? thanks in before James
RockyJames wrote:
How to declare it ?
One such way would be:
typedef CArray _Table;
_Table m_Tables;_Table* GetValue( void )
{
return &m_Tables;
}
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb