Members in Shoutbox
None.

Shoutbox Search
Search for:


Shoutbox Commands
/w [name] > Whisper
/r > Reply to last whisper
/me > Marks as action

Shoutbox Information
Moderators may delete any and all shouts at will.
Global Shoutbox
Please log in to shout.
Pages: < 1 « 3291 3292 3293 3294 32953572 >

[2014-10-24. : 3: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
[2014-10-24. : 3:55 am]
Dem0n -- Why did you create an entirely new table? And what does Bucket** in malloc do?
[2014-10-24. : 3:54 am]
Dem0n -- Ohh that worked :O
[2014-10-24. : 3:40 am]
poiuy_qwert -- and ask if you don't understand whats going on
[2014-10-24. : 3:40 am]
poiuy_qwert -- Try something like this: http://pastebin.com/pbDNUEFf
[2014-10-24. : 3:34 am]
Dem0n -- That function is probably littered with errors. I have no clue what I'm doing.
[2014-10-24. : 3:34 am]
Dem0n -- http://pastebin.com/B5wWY9Mx
[2014-10-24. : 3:30 am]
poiuy_qwert -- pastebin your code i'll take a look
[2014-10-24. : 3:25 am]
Dem0n -- poiuy_qwert
poiuy_qwert shouted: Dem0n Did you actually alloc a Table and assign it to *table?
I did
[2014-10-24. : 3:07 am]
KrayZee -- :wob:
[2014-10-24. : 2:50 am]
poiuy_qwert -- <3
[2014-10-24. : 2:49 am]
Moose -- We still love you.
[2014-10-24. : 2:49 am]
poiuy_qwert -- woops, just a little late to the party
[2014-10-24. : 2: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?
[2014-10-24. : 2:44 am]
Moose -- :wob:
[2014-10-24. : 2:43 am]
jjf28 -- In this world of false illusions in my heeead
[2014-10-24. : 2:41 am]
jjf28 -- :wob:
[2014-10-24. : 1: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:
[2014-10-24. : 1:07 am]
Moose -- LoveLess Good, it seems that the ones you end up with knowingly tend not to work out too well. :awesome:
[2014-10-24. : 1:03 am]
lil-Inferno -- That sounds fun.
[2014-10-24. : 1:01 am]
LoveLess -- Going on a blind date to this...
[2014-10-24. : 12:11 am]
jjf28 -- everybody was kung fo fightin'
[2014-10-24. : 12:00 am]
Dem0n -- double pointers suck man
[2014-10-23. : 11:58 pm]
Dem0n -- When I do that, it says, "error: assignment from incompatible pointer type"
[2014-10-23. : 11:57 pm]
jjf28 -- it would be (*blah)->buckets or (*(*blah)).buckets
[2014-10-23. : 11:57 pm]
jjf28 -- if you have table** blah
[2014-10-23. : 11:56 pm]
Dem0n -- When I tried table/*table, it was saying it couldn't find buckets in the structure D:
[2014-10-23. : 11:55 pm]
jjf28 -- *(*table) ?
[2014-10-23. : 11:47 pm]
Dem0n -- uninitialized*
[2014-10-23. : 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
[2014-10-23. : 11:46 pm]
Dem0n -- welp, apparently *(*table)->buckets = (Bucket *) calloc(table_size, sizeof(Bucket*)) is wrong. gives me a segfault :(
[2014-10-23. : 11:44 pm]
Dem0n -- i guess lul
[2014-10-23. : 11:44 pm]
jjf28 -- sizeof(*Buckets) is nonsensical? :)
[2014-10-23. : 11:43 pm]
Dem0n -- o: what's the difference?
[2014-10-23. : 11:43 pm]
jjf28 -- almost, sizeof(Bucket*)
[2014-10-23. : 11:43 pm]
Dem0n -- So what, sizeof(*Buckets)? That doesn't seem right
[2014-10-23. : 11:42 pm]
Dem0n -- Does calloc allocate enough memory for each element, or enough memory for the entire array?
[2014-10-23. : 11:42 pm]
jjf28 -- the size of the bucket pointers ofc
[2014-10-23. : 11:40 pm]
Dem0n -- If I have an array of pointers, what should the size of each element be? I don't ge tit
[2014-10-23. : 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
[2014-10-23. : 11:24 pm]
Dem0n -- I don't know what I should be getting the size of
[2014-10-23. : 11:24 pm]
Dem0n -- I know that :P
[2014-10-23. : 11:23 pm]
Moose -- It gets invoked like a function, but don't let it fool you
[2014-10-23. : 11:22 pm]
Moose -- sizeof is an operator
[2014-10-23. : 11:19 pm]
Dem0n -- ya jjf, I have no clue what sizeof is supposed to be
[2014-10-23. : 11:19 pm]
Moose -- ** is an operator for exponentiation in some languagesm but I don't think that's what you're doing there. :P
[2014-10-23. : 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?
[2014-10-23. : 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
[2014-10-23. : 11:05 pm]
jjf28 -- woops lol, open bold close italics :P
[2014-10-23. : 11:04 pm]
Dem0n -- D:
[2014-10-23. : 11:04 pm]
jjf28 -- sizeof(Bucket)? you're allocating an array of Bucket [b]pointers[/i], rethink your sizeof
[2014-10-23. : 11:00 pm]
Dem0n -- it's just a structure that I'm using as a hash table
[2014-10-23. : 10:59 pm]
jjf28 -- not really, we'd have to infer what a table is
[2014-10-23. : 10:59 pm]
Dem0n -- It says to initialize it to size table_size, so I did (*table)->buckets = (Bucket *) calloc(table_size, sizeof(Bucket))
[2014-10-23. : 10:59 pm]
Dem0n -- Can someone at least read that and just tell me how I'm supposed to initialize an array of Buckets lul
[2014-10-23. : 10:59 pm]
jjf28 -- but really I've only used arrays of pointers when it comes to strings (const char**)
[2014-10-23. : 10:56 pm]
Jack -- Usually a double pointer in a function argument is used to return pointers from a function. But you don't actually use return ptr;, instead you just modify the **ptr and it will affect the original pointer because you passed double pointers.
[2014-10-23. : 10:55 pm]
jjf28 -- unless the second pointer is denoting an array of pointers :kame:
[2014-10-23. : 10:53 pm]
Jack -- Double pointer is like a reference
[2014-10-23. : 10:46 pm]
Moose -- It's telling you to delete facebook, lawyer up, and hit the gym.
[2014-10-23. : 10:30 pm]
Dem0n -- ;_;
[2014-10-23. : 10:29 pm]
jjf28 -- too much work, ask one'a dem peeps paid to help you
[2014-10-23. : 10:28 pm]
Dem0n -- Can you tell me what this is telling me to do? I have no clue how to deal with double pointers
[2014-10-23. : 10:16 pm]
jjf28 -- probably the pointer, since the only rational reason to have a pointer to a pointer is if the pointer will change somehow (be allocated/deallocated, moved too a different object, incremented or decremented); but I don't know enough about your situation to say for sure
[2014-10-23. : 10:14 pm]
Moose -- 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.
Have you seen Moogle's?
[2014-10-23. : 10:11 pm]
Dem0n -- If I'm supposed to initialize something, and that thing is a passed into the function through a double pointer, what do I intialize? The thing itself? The pointer? The pointer to the pointer?
[2014-10-23. : 10:06 pm]
NudeRaider -- :wob:
[2014-10-23. : 10:04 pm]
Moose -- :clap:
[2014-10-23. : 10:04 pm]
Dem0n -- Never mind I fucking figured it out
[2014-10-23. : 10:02 pm]
Dem0n -- It's supposed to return the hash code for a string, so I rotate the original hash, add the char value to it, and then xor it with the non-rotated hash, and repeat for every char in the string, but it's not right.

Pages: < 1 « 3291 3292 3293 3294 32953572 >


Members Online: Symmetry