Quiz · Casts and Aliases · lesson 6 of 7
Quiz — using for a type
What happens when you build and run this program?
#include <iostream>
using Meters = double;
void print(double) { std::cout << "double"; }
void print(Meters) { std::cout << "Meters"; }
int main() {
Meters m = 2.5;
print(m);
}Subscribe to take the course
The course is free. Sign in with Telegram and subscribe to the channel to open every lesson.