How to declare a variable without specify type in C++

1 Answer

0 votes
#include <iostream>

int main() 
{
	auto n = 10;

	auto ch = 'Z';

	std::cout << n << std::endl;
	std::cout << ch << std::endl;

	return 0;
}

/*
run:

10
Z

*/

 



answered Feb 14, 2018 by avibootz
...