“Auto I CPP” Código de respuesta

Auto en 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;
}
Clear Corncrake

Auto I CPP

auto n=1;
// this will make the type int, and you can't change trough the program;
cout << n;
// OR
auto n="how you doin'";
cout << n;
Healthy Hedgehog

Respuestas similares a “Auto I CPP”

Preguntas similares a “Auto I CPP”

Más respuestas relacionadas con “Auto I CPP” en C++

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código