I preempt my question with the fact that I started using C++ two days ago.
I get this error: "a value of type "double (*)()" cannot be assigned to an entity of type "double""
My pertinent code:
#include "stdafx.h" #include <iostream> #include <string> using namespace std; double getInput() { double val1 = 0.00; // prompts user for a Double value cin >> "Enter a Double value: " >> val1; return val1; } Within main() I have the following statements whereby the equals sign is underlined in red and yields the above provided error message.
double var1; var1 = getInput; I must be making a silly mistake, as this seems as simple a programming task as they get, but I did preempt my question ;-) Thanks for any/all help! Additional Information:
- Using Visual Studio 2013 Ultimate
- This is a Console application
var1 = getInput();