All i am trying to do is display address of variables. here is what i have;
CODE
#include <iostream>
using namespace std;
int main()
{
int num, count;
char key, choice;
long date;
double yield, price;
cout << "The address of num = " << int(&num) << "\n";
cout << "The address of count = " << int(&count) << "\n";
cout << "The address of Key = " << char(&key) << "\n";
cout << "The address of choice = " << char(&choice) << "\n";
cout << "The address of date = " << long(&date) << "\n";
cout << "The address of yield = " << double(&yield) << "\n";
cout << "The address of price = " << double(&price) << endl;
return 0;
}
This is the compile error i get;
error C2440: '<function-style-cast>' : cannot convert from 'double *' to 'double'
1> There is no context in which this conversion is possible
i get 2 errors and both errors are the same
This post has been edited by zerogee: 3 Oct, 2008 - 08:14 PM