Search Results

Search found 2 results on 1 pages for 'mariomario'.

Page 1/1 | 1 

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

    - by mariomario
    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; }

    Read the article

  • Problem using mysql joins

    - by mariomario
    I'm fairly new to mysql and I have no idea if I'm heading in the right direction but I'm having trouble with a mysql query. I basically have a table of users id name ---- -------- 1 user1 2 user2 3 user3 4 user4 as well as a table of user attributes id userid attribute ---- ----- ------ 1 1 5 2 1 6 3 2 5 4 3 4 I want to be able to select users that have both the attribute 5 and the attribute 6, so in this case I want to return id name ---- -------- 1 user1 I tried using a join like this. SELECT u.id, u.name FROM users u LEFT JOIN attributes a ON (a.userid = u.id) WHERE a.attribute = 5 AND a.attribute = 6 But obviously that won't work, what is the best way of doing this?

    Read the article

1