C++ examples for Data Type:auto
Deducing a Function's Return Type Using auto
#include <iostream> using namespace std; auto AutoFunctionFromReturn(int parameter) { return parameter; } int main()/*from w w w . java 2 s . co m*/ { auto value = AutoFunctionFromReturn(1); cout << value << endl; return 0; }