A few different approaches :
- Store them as data members in the class, accessible via the object (e.g. like data_size in your example - or better style is for data member to be private with public getter/setter methods)
- Create them outside the constructor and pass them in as references
- Create them as global variables (accessible from main and the class, but considered bad style)
Probably the simplest way is to add them to your class (same as data_size) Whatever data types you need, first add them to the class definition :
class Huffman
{
public:
int data_size;
boolean my_flag;
int my_value;
Node my_array[20];
}
then assign the correct values to them in the constructor
Huffman::Huffman(char * argv)
{
//e.g.
my_flag = true;
}
then read / write them from Main via the object :
int main(int argc, char * * argv)
{
//...
if(Object1.my_flag)
{
}
}