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 « 3316 3317 3318 3319 33203570 >

[2014-10-13. : 4:10 am]
jjf28 -- holy crap my monitor
[2014-10-13. : 4:10 am]
O)FaRTy1billion[MM] -- in fact I used it a bit in the code I sent you to read tbl files :P
[2014-10-13. : 4:09 am]
O)FaRTy1billion[MM] -- I use it sometimes ...
[2014-10-13. : 4:08 am]
O)FaRTy1billion[MM] -- I don't like it because it's like a secret power, like some sort deep magic that I've been afraid to play with :P
[2014-10-13. : 4:08 am]
jjf28 -- really? not even just to step through an array?
[2014-10-13. : 4:07 am]
jjf28 -- it's like a secret power that teachers refuse to give out to higher language students
[2014-10-13. : 4:07 am]
O)FaRTy1billion[MM] -- D: I don't like pointer arithmetic.
[2014-10-13. : 4:06 am]
jjf28 -- lel pointer arithmetic
[2014-10-13. : 4:04 am]
O)FaRTy1billion[MM] -- I had a cheap advantage of having played with ASM, so I was aware of pointers already. :P
[2014-10-13. : 4:03 am]
jjf28 -- it's fun once you get it, but learning it? grossness
[2014-10-13. : 4:02 am]
O)FaRTy1billion[MM] -- Just hide the pointers behind handles. :P That's used every day.
[2014-10-13. : 4:02 am]
O)FaRTy1billion[MM] -- Hell? Who says it's hell?
[2014-10-13. : 4:00 am]
jjf28 -- that hell will come later =D
[2014-10-13. : 4:00 am]
jjf28 -- not yet ne ways
[2014-10-13. : 4:00 am]
jjf28 -- just return a pointer if you need an initialization function, don't trouble your mind with pointers to pointers :P
[2014-10-13. : 3:59 am]
O)FaRTy1billion[MM] -- and pointers to arrays of pointers! And pointers to array of pointers to pointers to arrays!
[2014-10-13. : 3:59 am]
Dem0n -- I'd rather not
[2014-10-13. : 3:58 am]
O)FaRTy1billion[MM] -- pointers to pointers, that's where the real fun starts.
[2014-10-13. : 3:58 am]
O)FaRTy1billion[MM] -- you can pass and change pointers ... if you pass it as album** :P
[2014-10-13. : 3:58 am]
jjf28 -- woops, local variable "album"*
[2014-10-13. : 3:55 am]
Dem0n -- sorry lel
[2014-10-13. : 3:55 am]
Dem0n -- I am rubber ducking the shit out of you guys
[2014-10-13. : 3:52 am]
Dem0n -- I think I might just have to deallocate the memory associated with each Photo stored in the Album
[2014-10-13. : 3:52 am]
jjf28 -- it'll change the location variable "album" and whatever variable you passed to the function will remain unchanged
[2014-10-13. : 3:52 am]
Dem0n -- I'm not sure because the Album is supposed to store Photo types, and there's a function that destroys the album, and the description says that I have to deallocate any memory associated with that album, and I don't know if that means I just have to free all the Photos, or if I have to free the actual Album
[2014-10-13. : 3:51 am]
jjf28 -- second you passed a pointer to a function, if the function changes the pointer you sent to it, the rest of your program will not know
[2014-10-13. : 3:51 am]
Dem0n -- jk I think I do have to do that
[2014-10-13. : 3:50 am]
jjf28 -- two problems, first (and less important) the one keeping you from compiling, cast to Album: album = (Album*)malloc()
[2014-10-13. : 3:50 am]
Dem0n -- oh wait I guess I don't have to do that
[2014-10-13. : 3:49 am]
Dem0n -- It says, "Incompatible types when assigning to type 'Album' from type 'void *'
[2014-10-13. : 3:48 am]
Dem0n -- If I have a function void initialize_album(Album *album), why can't I initialize that pointer using malloc?
[2014-10-13. : 3:42 am]
O)FaRTy1billion[MM] -- .. which also works.
[2014-10-13. : 3:42 am]
O)FaRTy1billion[MM] -- just realloc null
[2014-10-13. : 3:40 am]
jjf28 -- o that's right
[2014-10-13. : 3:39 am]
trgk -- actually free(null) won't do anything, defined by c standard
[2014-10-13. : 3:38 am]
jjf28 -- free(null); /** Enter Operating System Code */ if ( isAreaAllocatedToProcess() == false ) SCREAMABOUTMEMORYVIOLATION
[2014-10-13. : 3:38 am]
Dem0n -- nvm I see why
[2014-10-13. : 3:37 am]
Dem0n -- Why wouldn't my professor want me to free it if one of the allocations fails?
[2014-10-13. : 3:36 am]
Dem0n -- FaRTy1billion
FaRTy1billion shouted: just make sure if allocating for description fails or whatever that you free that .. don't want any memory leaks xD
Can you explain this nonsense to me? "You don’t have to worry about freeing memory if any memory allocation fails (e.g., one memory allocation was successful, but a second one fails)."
[2014-10-13. : 3:34 am]
O)FaRTy1billion[MM] -- or "%s\n", if you like newlines.
[2014-10-13. : 3:34 am]
O)FaRTy1billion[MM] -- I was thinking it'd have to be printf("%s", pic->description);, since that's the way printf is used
[2014-10-13. : 3:33 am]
jjf28 -- meh, i just cout ne ways :wob:
[2014-10-13. : 3:33 am]
O)FaRTy1billion[MM] -- so it wouldn't fail, but it also probably isn't good practice. :P
[2014-10-13. : 3:32 am]
O)FaRTy1billion[MM] -- Oh, I've never considered passing a string as the format of printf
[2014-10-13. : 3:32 am]
jjf28 -- FaRTy1billion
FaRTy1billion shouted: jjf28 That should fail. :P Use puts instead of printf and it will work
wut, it's a char* to a function that takes a char* and arbitrary characters
[2014-10-13. : 3:32 am]
trgk -- https://db.tt/Pyiv47Z1
[2014-10-13. : 3:32 am]
O)FaRTy1billion[MM] -- Though when I last updated it I said I was going to eventually add one ...
[2014-10-13. : 3:31 am]
O)FaRTy1billion[MM] -- I'm too lazy for a search.
[2014-10-13. : 3:31 am]
O)FaRTy1billion[MM] -- Roy
Roy shouted: Your suggestion makes more sense for something like the EUDDB, where there isn't a search function at all.
:P
[2014-10-13. : 3:31 am]
l)ark_ssj9kevin -- there's gvim
[2014-10-13. : 3:30 am]
Roy -- Your suggestion makes more sense for something like the EUDDB, where there isn't a search function at all.
[2014-10-13. : 3:30 am]
Roy -- The wiki search is using the MediaWiki search function, not SEN's. And it actually returns the correct result, unlike Google. And SEN's searching has been vastly improved in v6 in terms of performance.
[2014-10-13. : 3:29 am]
trgk -- CodeBlocks
[2014-10-13. : 3:29 am]
Dem0n -- I don't want to write my code in that shit
[2014-10-13. : 3:29 am]
Dem0n -- Yeah but does it have a gui or something
[2014-10-13. : 3:28 am]
jjf28 -- Roy
Roy shouted: Hey jjf, just so you know, there's a search function on the left-hand side of the wiki. You don't need to do the Google thing.
insite search over google? neva
[2014-10-13. : 3:28 am]
l)ark_ssj9kevin -- most linux ditros have vim already on it
[2014-10-13. : 3:27 am]
Dem0n -- How do I set up vim
[2014-10-13. : 3:27 am]
Dem0n -- I literally fucking hate Emacs
[2014-10-13. : 3:26 am]
Roy -- trgk
trgk shouted: Photo* pic = new Photo; (C++) :lol:
Yay for OOP!
[2014-10-13. : 3:26 am]
O)FaRTy1billion[MM] -- The equivalent in C++ is defining the functionality of what trgk
trgk shouted: Photo* pic = new Photo; (C++) :lol:
mentioned. :P
[2014-10-13. : 3:26 am]
O)FaRTy1billion[MM] -- also I've made lots and lots of functions for doing what you are doing ... xD
[2014-10-13. : 3:25 am]
Roy -- http://i.snag.gy/Hf3PR.jpg
[2014-10-13. : 3:24 am]
Roy -- In fact, doing your Google search for me doesn't even return the randomization page.
[2014-10-13. : 3:22 am]
Roy -- Hey jjf, just so you know, there's a search function on the left-hand side of the wiki. You don't need to do the Google thing.
[2014-10-13. : 3:22 am]
O)FaRTy1billion[MM] -- just make sure if allocating for description fails or whatever that you free that .. don't want any memory leaks xD
[2014-10-13. : 3:20 am]
Dem0n -- farty you're so smart o:
[2014-10-13. : 3:19 am]
Dem0n -- oh
[2014-10-13. : 3:19 am]
trgk -- Photo* pic = new Photo; (C++) :lol:
[2014-10-13. : 3:19 am]
O)FaRTy1billion[MM] -- ok, then you just have to do like Photo* pic = malloc(sizeof(Photo)); to intializie it

Pages: < 1 « 3316 3317 3318 3319 33203570 >


Members Online: jun3hong