Edit: The code is working now.
Hi all,
This is my first post here. I'm learning C++ by myself, and I'm using the free version of Visual Studio. I have the following code taken from a tutorial, but it gives me an error. I'm not sure why? It says that '*' operand must be a pointer. What does that mean? The code is
Code:
// Using the define directive
#include<iostream>
using namespace std;
#define PI 3.14 // it was #define PI 3.14;
int main()
{
double radius = 5.0;
double circle;
circle = 2 * PI * radius; //The error is here
cout << circle;
cin.get();
return 0;
}
Any help will be appreciated.
Thanks