what is the diference between using "<<" and get() function

operator>>() Extracts formatted data, while get() extracts un-formatted data.

Thus get() is usually used for file I/O and hardware operations, and operator>>() is used for handling user input (from command line by default).

For more info: operator>>(), get()

i want to ask which is more efficient

I don't think it would be wise to compare these two functions since each one of them does a different task.