operator<<

T

tsunami

hi
I am confused while writing member functions
I have declared them as public members of the class
class BitArray{
public:
BitArray& operator <<(int); //overloaded left shift operator
BitArray& operator>>(int); //overloaded right shift operator

I have declared private data members as:
private:
unsigned char* bitarray;
int size;

If you give me a hand while writing this functions I will be so
glad.Thanks for all.
 
V

Victor Bazarov

tsunami said:
I am confused while writing member functions
I have declared them as public members of the class
class BitArray{
public:
BitArray& operator <<(int); //overloaded left shift operator
BitArray& operator>>(int); //overloaded right shift operator

I have declared private data members as:
private:
unsigned char* bitarray;
int size;

If you give me a hand while writing this functions I will be so
glad.Thanks for all.

What is the requirement set for these functions? IOW, what are they
supposed to do? I really don't want to make up my own spec when you
undoubtedly have one ready.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,151
Latest member
JaclynMarl
Top