Use of this in the above code

in the above code we are using this pointer to access the private members of class queue, my question is can’t we access the the private data members of a class just by using the data member name or do we have to use this for every private data member of a class?

Hi jayasmit,
Yes we can access those members just by their member names. But sometimes it may happend that some names of your members might clash with the name of arguements in some member functions and there it becomes necessary to use this . Otherwise u can use those members just by their names , u can try that on ur own to see if it gives an error or not.