| initialization/init3b.cc - Initialization and auto - OK. | Lecture 2 - slide 26 : 29 Program 4 |
// Illustrates initialization and auto.
// Best to use = for initialization of variables of auto type.
// This example is OK.
#include <iostream>
void f(){
auto x = 101; // x is an int
std::cout << "x: " << x << std::endl; // OK: x: 101
}
int main(){
f();
}