WHAT IS AUTO ID? SIR USED IN FIND STL

WHAT IS AUTO ID? SIR USED IN FIND STL

Hey @dhruvilcodes
auto is keyword which is used in C++ for runtime identification of datatype. So if you use this then you don’t have to worry about writing correct datatype. It will automatically assign it.
For eg:- you need to iterate a vectorv then you can easily do it with less typing.

for(auto x : v) {  //now x is vector<int> type
       for(auto y : x){  //y is int type
             cout<<y;
       }
}
1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.