Wednesday, July 11, 2007

pointer to the class

My header class

class rectangle{
private:
int x,y;
public:
void setValue(int,int);
int area(void);
};

Thursday, July 5, 2007

Pointers

//Pointer is the address in the memory.
#include
using namespace std;

int main(){
int x;
int * mypointer;

mypointer = &x;

*mypointer = 2;

x = 3;

cout << "Value of x is: " << *mypointer << endl;
//What we will get?


return 0;
}