Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

auto in cpp

#include<iostream>
#incllude<vector>
using namespace std;

int main() {
   vector<int> vec(10);       // Auto deduce type to be iterator of a vector of ints.
   for(auto it = vec.begin(); it != vec.end(); vec ++)
   {
      cin >> *it;
   }
   return 0;
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #auto #cpp
ADD COMMENT
Topic
Name
7+1 =