Games
1
Name:
C++
2007-02-17 16:52
Hey prog how many of you like to program games?
41
Name:
JustAnotherAnonymousUser
2007-02-22 8:13
ID:/xP/S3wk
I could have dynamically allocated memory for the LongCat struct's data member "name", but I thought that would be over-do-ing it.
42
Name:
Anonymous
2007-02-22 11:56
ID:bZCePHy7
Use the struct hack for the body size.
43
Name:
Anonymous
2007-02-22 12:11
ID:3VDah3wE
char* longcat = malloc(1/0);
44
Name:
Anonymous
2007-02-23 18:45
ID:TJ7OTm6t
45
Name:
Anonymous
2007-02-23 19:00
ID:zdBeuG2p
>>4
struct longcat
{
char body[];
};
longcat looooongcat;
memset(looooongcat.body, 0, 0xFFFFFFFF);
46
Name:
Anonymous
2007-02-23 20:32
ID:TJ7OTm6t
>>45
I've never been able to put an array of an unspecified size in a struct.
47
Name:
Anonymous
2007-02-23 21:28
ID:caWoz+Xy
<pre>def memoize(fn):
vals = {}
def memoized(*args):
if args not in vals:
vals[args] = fn(*args)
return vals(args)
return memoized</pre>
How do I formatted code on these boards?
48
Name:
Anonymous
2007-02-24 3:00
ID:JbdBtvp5
49
Name:
Anonymous
2007-02-24 3:29
ID:Heaven
>>46
iirc, you can do this as long as the unspecified array is the last member
50
Name:
Anonymous
2007-02-24 11:02
ID:ZVEBfjOn
51
Name:
Anonymous
2007-02-24 21:51
ID:Heaven
52
Name:
Anonymous
2009-01-14 13:16
LISP
54
Name:
Anonymous
2010-06-25 14:50
WARNING: NECRO POST
55
Name:
Anonymous
2011-01-31 21:34
<-- check em dubz
56
Name:
tray
2012-03-15 16:15
hey ya all, guten tag!
57
Name:
Anonymous
2012-03-15 19:33
58
Name:
Anonymous
2012-03-15 22:29
Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
Newer Posts