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

Pages: < 1 2 3 4 5 287 >

[2014-10-28. : 4:57 am]
Dem0n -- I thought I'd never find it ;_;
[2014-10-28. : 4:57 am]
Dem0n -- oh my fucking god, i found the leak
[2014-10-28. : 4:54 am]
O)FaRTy1billion[MM] -- make it intentionally super leaky, and so super leaky that it just fills up all available ram
[2014-10-28. : 4:48 am]
Dem0n -- memory leaks :rip:
[2014-10-28. : 4:45 am]
O)FaRTy1billion[MM] -- Well, deleting facebook probably isn't. I'm not sure what is involved in "lawyering up"... But it seems difficult to code while at a gym
[2014-10-28. : 4:42 am]
O)FaRTy1billion[MM] -- Mini Moose 2707
Mini Moose 2707 shouted: Delete facebook, lawyer up, hit the gym.
That sound counterproductive for coding
[2014-10-28. : 4:12 am]
poiuy_qwert -- k, gl
[2014-10-28. : 4:08 am]
Dem0n -- I guess I'll just go to office hours tomorrow and see what I'm actually supposed to do. I'm probably not even explaining it right to you
[2014-10-28. : 4:08 am]
Dem0n -- yeah
[2014-10-28. : 4:03 am]
poiuy_qwert -- this is C right, not C++?
[2014-10-28. : 4:03 am]
poiuy_qwert -- the user has to provide the size of the value somewhere
[2014-10-28. : 4:03 am]
poiuy_qwert -- then there is no way to do it
[2014-10-28. : 4:02 am]
Dem0n -- They do not. That's what I don't get. There's literally no function where the size of value is given to me.
[2014-10-28. : 4:01 am]
poiuy_qwert -- so what is the Table creating function like? do they provide the value size there?
[2014-10-28. : 3:59 am]
Dem0n -- I can't change the function parameters. Those were given by my professor.
[2014-10-28. : 3:55 am]
poiuy_qwert -- http://pastebin.com/D2ztV6U8
[2014-10-28. : 3:46 am]
l)ark_ssj9kevin -- how do twist tie trash bags work
[2014-10-28. : 3:45 am]
Dem0n -- This is what my function is. It probably doesn't work at all.
[2014-10-28. : 3:44 am]
Dem0n -- Or maybe I am for the value in the bucket... The descriptions of what I'm supposed to do are confusing as fuck
[2014-10-28. : 3:43 am]
Dem0n -- I'm not supposed to malloc the value :(
[2014-10-28. : 3:43 am]
poiuy_qwert -- how about pastebin your current function?
[2014-10-28. : 3:42 am]
poiuy_qwert -- you need to malloc the bucket->value then memcpy into it
[2014-10-28. : 3:41 am]
Dem0n -- But even when I do memcpy and then set the two values equal, when I try to print the value, I get "(void *) 0x7fffffff ..."
[2014-10-28. : 3:41 am]
Dem0n -- it is :O
[2014-10-28. : 3:40 am]
poiuy_qwert -- buckets->value should be a void*?
[2014-10-28. : 3:39 am]
Dem0n -- Wait, but then when I do buckets->value = value, how does that work? Doesn't it still need to know what type value is?
[2014-10-28. : 3:38 am]
poiuy_qwert -- sorry that might explain a little better
[2014-10-28. : 3:38 am]
poiuy_qwert -- int save = 5; void *value = &save; size_t valueSize = sizeof(int); int load; void *param = &load; memcpy(param, value, valueSize);
[2014-10-28. : 3:37 am]
Dem0n -- wait nvm
[2014-10-28. : 3:37 am]
Dem0n -- Is load supposed to be a pointer there?
[2014-10-28. : 3:34 am]
poiuy_qwert -- int save = 5; void *value = &save; size_t valueSize = sizeof(int); int load; memcpy(&load, value, valueSize);
[2014-10-28. : 3:30 am]
poiuy_qwert -- thats the only way to do it. you don't cast anything, you use memcpy to copy the correct amount of bytes
[2014-10-28. : 3:28 am]
Dem0n -- Hmm not sure if that's how I'm supposed to do it. But even if it is, how do I know what type to cast it as?
[2014-10-28. : 3:26 am]
poiuy_qwert -- you said the user provides how much memory should be allocated for it, you need to store it if you arn't already
[2014-10-28. : 3:25 am]
Dem0n -- I don't know the size; all I have at my disposal is void* value
[2014-10-28. : 3:24 am]
poiuy_qwert -- you know the size, so use memcpy
[2014-10-28. : 3:23 am]
Dem0n -- I have to write a function that inserts a node into a linked list, and the node has a key/value pair. The key is a string, which is easy to put into the node, but the value is a void pointer. My TAs have said that the user of the program is supposed to specify what type value is and how much memory should be allocated for it; all I have to do is set the node's value equal to the parameter value. But I don't know how to do that if I don't know the value's type.
[2014-10-28. : 3:21 am]
poiuy_qwert -- Dem0n
Dem0n shouted: Well I have a variable value of type void*, and I have functions where I have to set that value equal to the parameter value, but the value could be any type, so I don't know what to cast it to :O
this doesnt make much sense. how can the parameter be any type, js it a void*? what is/where is this "variable value of type void*"?
[2014-10-28. : 3:16 am]
Dem0n -- Well shit X^ D
[2014-10-28. : 3:14 am]
jjf28 -- with void you don't know the type, and with C there's no way of extracting the type.
[2014-10-28. : 3:01 am]
Dem0n -- it could literally be an int, char, double, etc..
[2014-10-28. : 3:01 am]
Dem0n -- Well I have a variable value of type void*, and I have functions where I have to set that value equal to the parameter value, but the value could be any type, so I don't know what to cast it to :O
[2014-10-28. : 2:56 am]
jjf28 -- build structs with overlapping members if you know it's part of a family of structs
[2014-10-28. : 2:56 am]
jjf28 -- don't
[2014-10-28. : 1:59 am]
Dem0n -- How can you dereference a void pointer without knowing the type? :O
[2014-10-28. : 1:26 am]
NudeRaider -- Man Eva Green so mesmerizing in the new Sin City movie.
[2014-10-28. : 1:11 am]
jjf28 -- Delete facebook, lawyer up, and hit the gym.
[2014-10-28. : 1:10 am]
Dem0n -- What's it mean if a function pointer is null?
[2014-10-28. : 1:02 am]
Devourer -- v6 has been out two months now :)
[2014-10-28. : 12:18 am]
Mini Moose 2707 -- Delete facebook, lawyer up, hit the gym.
[2014-10-28. : 12:16 am]
Dem0n -- Moose, how do you make a linked list in C? :prof:
[2014-10-28. : 12:01 am]
Mini Moose 2707 -- Yeah, me too.
[2014-10-27. : 11:59 pm]
KrayZee -- As soon as catwoman received her clean slate, she became an astronaut.
[2014-10-27. : 11:48 pm]
KrayZee -- :wob:
[2014-10-27. : 11:43 pm]
MasterJohnny -- create*
[2014-10-27. : 11:43 pm]
MasterJohnny -- i want to great a matrix of even spacing for bogth rows and columns
[2014-10-27. : 11:42 pm]
MasterJohnny -- anyone good with matlab?
[2014-10-27. : 11:29 pm]
Fire_Kame -- :lol:
[2014-10-27. : 9:55 pm]
Generalpie -- Vræl pls.
[2014-10-27. : 9:29 pm]
Mini Moose 2707 -- veal pls
[2014-10-27. : 8:39 pm]
Vrael -- I am Batman.
[2014-10-27. : 8:29 pm]
Fire_Kame -- I could dissect his video too...but the last half are the ravings of a mad man (his whole fortresses in a wasteland) and the first half don't even cite statistics or data properly (such as the doubling rate of the disease - this is inaccurate based on the numbers we have available, but you could just as easily argue that not enough numbers are available yet to even graph the rate)
[2014-10-27. : 8:27 pm]
Fire_Kame -- and argued against his core idea that ebola is going to kill us all
[2014-10-27. : 8:26 pm]
Fire_Kame -- x3 my post was not tangent filled! It was very related to the topic at hand
[2014-10-27. : 8:24 pm]
O)FaRTy1billion[MM] -- I just picked out a few points that I thought to be valid, and then decided "I agree."
[2014-10-27. : 8:23 pm]
O)FaRTy1billion[MM] -- I just said I didn't read it. xD
[2014-10-27. : 7:59 pm]
jjf28 -- fear-mongering is no excuse for a section-less, tangent-filled wall :kame:
[2014-10-27. : 7:35 pm]
O)FaRTy1billion[MM] -- Though really all I read was "Straight put, this is fear-mongering at its finest." and "In short, as much as I hate the saying, keep calm and carry on. And get a damn flu shot." and skimming through bits of the rest xD
[2014-10-27. : 7:33 pm]
O)FaRTy1billion[MM] -- yay, Kame. I should show that to my grandma.

Pages: < 1 2 3 4 5 287 >


Members Online: Roy, l)ark_ssj9kevin, Generalpie, Dem0n