Horje
auto in cpp Code Example
auto& in c++

    Use auto && for the ability to modify and discard values of the sequence within the loop. (That is, unless the container provides a read-only view, such as std::initializer_list, in which case it will be effectively an auto const &.)
    Use auto & to modify the values of the sequence in a meaningful way.
    Use auto const & for read-only access.
    Use auto to work with (modifiable) copies.
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;
}
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;




Cpp

Related
for llop in c++ Code Example for llop in c++ Code Example
appending string in c++ Code Example appending string in c++ Code Example
MPI wait Code Example MPI wait Code Example
person parametr cpp Code Example person parametr cpp Code Example
find number of 1s in a binary cv::mat image Code Example find number of 1s in a binary cv::mat image Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9