Staredit Network Global Shoutbox
Members in Shoutbox

Shoutbox Search
You may search for a phrase in the shoutbox.

Search for:


Shoutboxcommands
/w [name] Whispers.
/r Answers to whisperer.
/me Marks as action.

Shoutbox Information
Moderators may delete one or more of your shouts at any given time without notice and reason.
The Shoutbox may be good to ask for small pieces of advice, but for real questions, you still want to use our Forums
Global Shoutbox
Please log in to shout.

[05:59 pm]
Azrael -- :wob:
[05:49 pm]
Sacrieur -- :wob:
[05:41 pm]
Dem0n -- :wob:
[05:26 pm]
lil-Inferno -- :wob:
[11:51 am]
Sacrieur -- :roy:
[11:04 am]
Mini Moose 2707 -- :poke:
[07:08 am]
jjf28 -- we're still strugglin' halfway through this journey.. our eyes are bunin' but we're not slow-in-down
[06:05 am]
jjf28 -- infects the eye, much the way Roose Bolton's soft voice adds to his aura of power
[06:04 am]
jjf28 -- it's an eye hack
[04:46 am]
LoveLess -- What the fuck is wit this dark text.
[04:41 am]
poiuy_qwert -- np, gnite
[04:40 am]
Dem0n -- Well, I gotta sleep now. Thanks for your help though!
[04:36 am]
Dem0n -- interesting
[04:27 am]
poiuy_qwert -- Compare allocating an array of ints to an array of int pointers: http://pastebin.com/vazi7zQM
[04:25 am]
poiuy_qwert -- sorry, "Bucket *firstBucket = buckets[0], *secondBucket = buckets[1];" should be the same as well
[04:22 am]
poiuy_qwert -- "Bucket *firstBucket = *buckets[0], *secondBucket = *buckets[1];" should be the same as well
[04:13 am]
poiuy_qwert -- no its a 1d array, but its an array of pointers. so "Bucket *firstBucket = *(buckets + 0), *secondBucket = *(buckets + 1);"
[04:08 am]
Dem0n -- If I wanted to access a list of buckets in one of the columns, would I use *buckets?
[04:08 am]
Dem0n -- So **buckets is basically a 2d array, right?
[04:03 am]
poiuy_qwert -- if you need a deeper explanation just ask
[04:01 am]
poiuy_qwert -- Using (Bucket **) is because calloc is returning a pointer to pointers to Buckets, not a pointer to Buckets
[03:58 am]
poiuy_qwert -- I only created a temporary variable to store the pointer to the Table, that way I didn't have to dereference the table pointer every line. Makes it easier to read and is slightly more efficient
[03:55 am]
Dem0n -- Why did you create an entirely new table? And what does Bucket** in malloc do?
[03:54 am]
Dem0n -- Ohh that worked :O
[03:40 am]
poiuy_qwert -- and ask if you don't understand whats going on
[03:40 am]
poiuy_qwert -- Try something like this: http://pastebin.com/pbDNUEFf
[03:34 am]
Dem0n -- That function is probably littered with errors. I have no clue what I'm doing.
[03:30 am]
poiuy_qwert -- pastebin your code i'll take a look
[03:25 am]
Dem0n -- poiuy_qwert
poiuy_qwert shouted: Dem0n Did you actually alloc a Table and assign it to *table?
I did
[03:07 am]
KrayZee -- :wob:
[02:50 am]
poiuy_qwert -- <3
[02:49 am]
Mini Moose 2707 -- We still love you.
[02:49 am]
poiuy_qwert -- woops, just a little late to the party
[02:48 am]
poiuy_qwert -- Dem0n
Dem0n shouted: welp, apparently *(*table)->buckets = (Bucket *) calloc(table_size, sizeof(Bucket*)) is wrong. gives me a segfault :(
Did you actually alloc a Table and assign it to *table?
[02:44 am]
Mini Moose 2707 -- :wob:
[02:43 am]
jjf28 -- In this world of false illusions in my heeead
[02:41 am]
jjf28 -- :wob:
[01:14 am]
LoveLess -- Mini Moose 2707
Mini Moose 2707 shouted: LoveLess Good, it seems that the ones you end up with knowingly tend not to work out too well. :awesome:
:massimo:
[01:07 am]
Mini Moose 2707 -- LoveLess Good, it seems that the ones you end up with knowingly tend not to work out too well. :awesome:
[01:03 am]
lil-Inferno -- That sounds fun.
[12:11 am]
jjf28 -- everybody was kung fo fightin'
[12:00 am]
Dem0n -- double pointers suck man
[11:58 pm]
Dem0n -- When I do that, it says, "error: assignment from incompatible pointer type"
[11:57 pm]
jjf28 -- it would be (*blah)->buckets or (*(*blah)).buckets
[11:57 pm]
jjf28 -- if you have table** blah
[11:56 pm]
Dem0n -- When I tried table/*table, it was saying it couldn't find buckets in the structure D:
[11:55 pm]
jjf28 -- *(*table) ?
[11:47 pm]
Dem0n -- uninitialized*
[11:46 pm]
Dem0n -- my memory checker thingy says there's a use of unitialized value of size 8 and invalid write of size 8 on that line
[11:46 pm]
Dem0n -- welp, apparently *(*table)->buckets = (Bucket *) calloc(table_size, sizeof(Bucket*)) is wrong. gives me a segfault :(
[11:44 pm]
Dem0n -- i guess lul
[11:44 pm]
jjf28 -- sizeof(*Buckets) is nonsensical? :)
[11:43 pm]
Dem0n -- o: what's the difference?
[11:43 pm]
jjf28 -- almost, sizeof(Bucket*)
[11:43 pm]
Dem0n -- So what, sizeof(*Buckets)? That doesn't seem right
[11:42 pm]
Dem0n -- Does calloc allocate enough memory for each element, or enough memory for the entire array?
[11:42 pm]
jjf28 -- the size of the bucket pointers ofc
[11:40 pm]
Dem0n -- If I have an array of pointers, what should the size of each element be? I don't ge tit
[11:26 pm]
Zycorax -- Roy
Roy shouted: Hey Zycorax, don't take this the wrong way, but your Steam profile strongly suggests you are afflicted by fiscal irresponsibility (buying games you do not play). This mentality scales out to your spending habits in general, and you're likely vulnerable to manipulative advertising. You should take a course in personal finance and educate yourself on psychology in marketing: it will protect your wallet, and you'll have a bunch of extra money for things you actually want/need.
hah, I only really spend money on rent, food and games
[11:24 pm]
Dem0n -- I don't know what I should be getting the size of
[11:24 pm]
Dem0n -- I know that :P
[11:23 pm]
Mini Moose 2707 -- It gets invoked like a function, but don't let it fool you
[11:22 pm]
Mini Moose 2707 -- sizeof is an operator
[11:19 pm]
Dem0n -- ya jjf, I have no clue what sizeof is supposed to be
[11:19 pm]
Mini Moose 2707 -- ** is an operator for exponentiation in some languagesm but I don't think that's what you're doing there. :P
[11:13 pm]
Dem0n -- I also have no clue what the hell **buckets means. Is it a double pointer so that you can have a 2d array for chained hashing?
[11:05 pm]
Dem0n -- I thought doing that would create an array of size table_size with each element allocating enough memory to fit a Bucket type
[11:05 pm]
jjf28 -- woops lol, open bold close italics :P



Members Online: Roy, Azrael, Sacrieur