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.

m talking in case of files

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.