Q:

How to check if a pointer is null in C++ Visual 2010

I am having problems here if I want to check if eerste points to nothing I get 

Blockquote
Unhandled exception at 0x003921c6 in
  Bank.exe: 0xC0000005: Access violation
  reading location 0xccccccd0. 

and I am kinda wondering why he justs skips the if statement or doens't stop when the object eerste points to nothing
Bank::Bank()
{
 LijstElement *eerste = NULL;
 LijstElement *laatste = NULL;
}

 Rekening * Bank::getRekening(int rekNr)
{

 if(NULL ! = eerste)
 {
  LijstElement *nummer = eerste;
  while(nummer->volgende!= NULL)
  {
   Rekening *een = nummer->getRekening();
   if(een->getRekNr()==rekNr)
    {
     return een;
    }
   else
   {
    nummer = nummer->volgende;
   }
  }
 }
 return NULL;   
}

A:

I think you have to change 
Bank::Bank()
{
    eerste = NULL;
    laatste = NULL;
}

because they are probably declared in your class as member variables and you're declaring them as local variables.  
As Fred Larson proposed, you can also use initialization lists. 
Bank::Bank() : eerste(NULL), laatste(NULL)  
{
//whatever else you are planning to do in your constructor
}

A:

eerste and laatste are not your Bank class's member variables, but the local variables of the contructor (even if members are defined, the local vars override them in the constructor - so the actual member variables remain unassigned)
I'd propose to use a naming convention (add a m_ prefix to member variables) and a simple initialization list :
class Bank
{
public:     
  Bank() : m_eerste(NULL), m_laatste(NULL)
  {}

  private:
    LijstElement *m_eerste;
    LijstElement *m_laatste;

};

