Depending on the format string, the function may expect a sequence of additional arguments, each containing a pointer to allocated storage where the interpretation of the extracted characters is stored with the appropriate type.
There should be at least as many of these arguments as the number of values stored by the format specifiers. Additional arguments are ignored by the function.
These arguments are expected to be pointers: to store the result of a scanf operation on a regular variable, its name should be preceded by the reference operator (&)
You only need the '&' in front of input1 on scanf because it takes memory addresses not values like printf. Adding it anywhere else in this code would cause errors.
Some more material on pointers below. It's an important topic to understand in C++.
Pointers - C++ Tutorials[
^]
Pointers in C/C++ with Examples - GeeksforGeeks[
^]
EDIT:
The reason you get that error is because scanf is trying to use the value of input1 (1.1) as a memory address (0x9999999A). Your code doesn't own that memory so is getting an access violation.