   Please help with code?
  Could someone please download my code and tell me what i'm doing wrong?the code is a mess i know , and i'm not a very good programmer (yet), but if someone could help me with the problem of collision against the side walls i would be very greatful. the top and bottom walls work fine(i think), its just the side ones.thanks for any help.http://209.245.59.38/Gimme/95158107/1075651009/81023138/0F1965F3-3317-4EBB-9E89-09C6253DFB76/0.45187/2/Snooker.rar   
  You're asking people to go through a lot of trouble to help you debug your code...I personally am too lazy to visit your link, download your RAR file, create a new project, open your code, etc. I'm sure I'm not alone either.You might get a better response if you copy/paste the code which you think is causing you trouble inside of [ source] tags in your post.   ;  ok no problem. ill just give a bit of my code, this is my update function, which checks for collisions aswell as moves the balls by in-turn calling the objects own update funciton.the thing is that the angles of the sides are sometime correct but more than often completly wrong.dt is a const val of 0.02void update(){player.update(dt);bBall.update(dt);cout << CPstationary(player,player, bBall) << endl;//COLLISION DETECTION + AFTERMATH CODEif(CPstationary(player,player, bBall) < -1){player.setAngle((90*3.141529/180)+player.getAng()/2);bBall.setSpeed(player.getSpeed());bBall.setAng(180*(3.141529/180) - player.getAng());}//CHECKS IF THE BALL HAS WENT PAST THE EDGES OF THE TALBE - TR = TOP RIGHT, ETCif(distToLine(player.getPos(), table.getBR(), table.getTR()) < 5){player.setAngle((90*(3.141529/180))+(player.getAng()/2));}if(distToLine(player.getPos(), table.getBL(), table.getTL()) < 5){player.setAngle((90*(3.141529/180))-(player.getAng()/2));}if(distToLine(player.getPos(), table.getTL(), table.getTR()) < 5){player.setAngle(-player.getAng());}if(distToLine(player.getPos(), table.getBL(), table.getBR()) < 5){player.setAngle(-player.getAng());}//BLACK BALL COLLISION DETECTIONif(distToLine(bBall.getPos(), table.getBR(), table.getTR()) < 5){bBall.setAng((90*(3.141529/180))+(bBall.getAng()/2));}if(distToLine(bBall.getPos(), table.getBL(), table.getTL()) < 5){bBall.setAng((90*(3.141529/180))-(bBall.getAng()/2));}if(distToLine(bBall.getPos(), table.getTL(), table.getTR()) < 5){bBall.setAng(-bBall.getAng());}if(distToLine(bBall.getPos(), table.getBL(), table.getBR()) < 5){bBall.setAng(-bBall.getAng());}}--------------------------------------------------------------------------void cPlayer::update(const double time){disp.x = speed * cos(angle);disp.y = speed * sin(angle);if(speed < 0) {speed = 0;}float friction = 0.5 *(playerMass*10);speed = speed - friction;disp.x = disp.x *time;disp.y = disp.y *time;playerPos.x = playerPos.x + disp.x;playerPos.y = playerPos.y + disp.y;};  ahh, ive just figured it out myself :)it was just something to do with the way i was calculating the new angles, fine now though   