Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 663253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:28:10+00:00 2026-05-13T23:28:10+00:00

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

  • 0

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;   
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:28:10+00:00Added an answer on May 13, 2026 at 11:28 pm

    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
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having problems with validation using AJAX. I want to check if a
Here is the code I'm having problems with: The interface: public interface anInterface {
I'm following the kernel tutorial from here im having problems compiling my files. i
I'm not sure what's going on here but here's a section I'm having problems
I'm having some problems with getting the .getruntime.exec() to work properly. Here is the
I'm having some problems implementing an algorithm to read a foreign process' memory. Here
I'm having problem regarding session items. Before I use them, I want to check
I am now having some problems when I want to create my application for
I'm having a little problem here, I'm new to Actionscript 3, and what I'm
Super weird problem here. I'm having trouble getting jQuery to bind any selectors except

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.