Official Techie
In the zone
i want to know whats the problem i want to print the address of a initialised variable
#include<iostream.h>
int main()
{
int i;
int z;
z = &i;
cout<<"the address"<<z;
cout<<"\n";
cout<<"the value is"<<i;
return i;
}
the error
--------------------Configuration: a program of value and address - Win32 Debug--------------------
Compiling...
a program of value and address.cpp
D:\Documents and Settings\Sudipta\school\c++\a program of value and address.cpp(6) : error C2440: '=' : cannot convert from 'int *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
a program of value and address.obj - 1 error(s), 0 warning(s)
i want to know about stack functions constructors destructors and friend function and how to use inheritance
#include<iostream.h>
int main()
{
int i;
int z;
z = &i;
cout<<"the address"<<z;
cout<<"\n";
cout<<"the value is"<<i;
return i;
}
the error
--------------------Configuration: a program of value and address - Win32 Debug--------------------
Compiling...
a program of value and address.cpp
D:\Documents and Settings\Sudipta\school\c++\a program of value and address.cpp(6) : error C2440: '=' : cannot convert from 'int *' to 'int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
a program of value and address.obj - 1 error(s), 0 warning(s)
i want to know about stack functions constructors destructors and friend function and how to use inheritance