[Error] 'it' does not name a type

What is “auto it”???
While running the same code in my PC its showing this Error…

[Error] ‘it’ does not name a type

auto i = 1; means i is an integer.
auto i = “abc”; means i is a string.
auto keyword automatically assigns the data type according to the right side.
eg for(auto it : string){} --> it would be char
for(auto it : vector) it would be int
main keyword is auto here, ‘it’ is just any random name.

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.