Message Board Basketball Forum - InsideHoops

Go Back   Message Board Basketball Forum - InsideHoops > InsideHoops Main Basketball Forums > Off the Court Lounge

Off the Court Lounge Basketball fans talk about everything EXCEPT basketball here

Reply
 
Thread Tools
Old 03-03-2012, 10:51 AM   #16
highwhey
el vato encabronado
 
Join Date: Apr 2008
Location: Phoenix
Posts: 5,776
Default Re: Does anyone know C++ or similair language?

pretty sure Hazard knows it. he's helpful so i would ask him if i were you.
highwhey is offline   Reply With Quote
Old 03-03-2012, 03:40 PM   #17
Bladers
Banned
 
Bladers's Avatar
 
Join Date: Jun 2010
Posts: 5,869
Default Re: Does anyone know C++ or similair language?

Yeah I know C++, but what is it to you? what exactly don't you understand about pointers and memory management?

Speak now or forever hold your peace.
Bladers is offline   Reply With Quote
Old 03-03-2012, 04:28 PM   #18
DFish
Banned
 
DFish's Avatar
 
Join Date: May 2010
Location: Los Angeles
Posts: 1,729
Default Re: Does anyone know C++ or similair language?

Quote:
Originally Posted by Bladers
Yeah I know C++, but what is it to you? what exactly don't you understand about pointers and memory management?

Speak now or forever hold your peace.

No, you don't know anything. Literally. Anything.
DFish is offline   Reply With Quote
Old 03-03-2012, 04:56 PM   #19
leopoldstotch
Book 'em Dan'l
 
Join Date: Apr 2008
Location: the land of the free
Posts: 3,708
Default Re: Does anyone know C++ or similair language?

maybe OP wants us to malloc() his posts for a neg to be saved in the future.
leopoldstotch is offline   Reply With Quote
Old 03-03-2012, 05:20 PM   #20
sixerfan82
College star
 
Join Date: Dec 2006
Location: south jersey
Posts: 3,882
Default Re: Does anyone know C++ or similair language?

don't use C++ for memory allocation, download the boost library and let it handle it for you, pro tip

oh yea, btw, i can help?
sixerfan82 is offline   Reply With Quote
Old 03-03-2012, 09:42 PM   #21
BallsOut
NBA lottery pick
 
Join Date: Dec 2009
Posts: 5,058
Default Re: Does anyone know C++ or similair language?

Pointers: A team may only have 5 players on the floor at any time, so let's say the positions (PG, SG, SF, PF, and C) are 5 pointers. Each pointer points to a specific player on the team that is currently checked into the game.

So if the Lakers were playing

PG: Blake
SG: Kobe
SF: Barnes
PF: Gasol
C: Bynum

PG* pgPtr = &PG;
SG* sgPtr = &SG;
SF* sfPtr = &SF;
PF* pfPtr = &PF;
C* cPtr = &C;

then PG points to Blake (*pgPtr = Blake), SG points to Kobe (*sgPtr = Kobe), etc.. but now say Blake goes out and Fisher comes in, the pointer now points to Fisher (*pgPtr = Fisher).

Dynamic memory allocation: Signing 1-day contracts (if they have these in the NBA) to players and then cutting them if you no longer need them vs. static memory allocations (signing players for an entire season). If they suck, you're stuck with them until the season ends.

Hope that helps

Last edited by BallsOut : 03-03-2012 at 09:44 PM.
BallsOut is offline   Reply With Quote
Old 03-03-2012, 09:44 PM   #22
LJJ
Extra Cheese
 
LJJ's Avatar
 
Join Date: Apr 2007
Posts: 14,433
Default Re: Does anyone know C++ or similair language?

Makes me think of that famous Bash quote:


<Sonium> someone speak python here?
<lucky> HHHHHSSSSSHSSS
<lucky> SSSSS
<Sonium> the programming language
LJJ is offline   Reply With Quote
Old 03-03-2012, 10:53 PM   #23
sixerfan82
College star
 
Join Date: Dec 2006
Location: south jersey
Posts: 3,882
Default Re: Does anyone know C++ or similair language?

Quote:
Originally Posted by BallsOut
Pointers: A team may only have 5 players on the floor at any time, so let's say the positions (PG, SG, SF, PF, and C) are 5 pointers. Each pointer points to a specific player on the team that is currently checked into the game.

So if the Lakers were playing

PG: Blake
SG: Kobe
SF: Barnes
PF: Gasol
C: Bynum

PG* pgPtr = &PG;
SG* sgPtr = &SG;
SF* sfPtr = &SF;
PF* pfPtr = &PF;
C* cPtr = &C;

then PG points to Blake (*pgPtr = Blake), SG points to Kobe (*sgPtr = Kobe), etc.. but now say Blake goes out and Fisher comes in, the pointer now points to Fisher (*pgPtr = Fisher).

Dynamic memory allocation: Signing 1-day contracts (if they have these in the NBA) to players and then cutting them if you no longer need them vs. static memory allocations (signing players for an entire season). If they suck, you're stuck with them until the season ends.

Hope that helps

the geek in me says your code has a memory leak
sixerfan82 is offline   Reply With Quote
This NBA Basketball News Website Sponsored by:
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 07:14 AM.




NBA Basketball Forum Key Links:
InsideHoops Home
NBA Rumors
Basketball Blog
NBA Daily Recaps
NBA Videos
Fantasy Basketball
NBA Mock Draft
NBA Free Agents
All-Star Weekend
---
High School Basketball
Streetball
---
InsideHoops Twitter
Search Our Site













Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd. Terms of Use/Service | Privacy Policy