|
Members in Shoutbox
None.
Shoutbox Search
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.
[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:28 am] jjf28 -- RoyRoy 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:26 am] O)FaRTy1billion[MM] -- The equivalent in C++ is defining the functionality of what trgktrgk shouted: Photo* pic = new Photo; (C++) mentioned. ![]() ![]() [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: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:19 am] O)FaRTy1billion[MM] -- ok, then you just have to do like Photo* pic = malloc(sizeof(Photo)); to intializie it[2014-10-13. : 3:19 am] O)FaRTy1billion[MM] -- is it like Photo* makePhoto(int id, char* description) ?[2014-10-13. : 3:18 am] Dem0n -- But there is none. This function has just an int and a char* as the parameters, which are the variables inside the struct that I'm supposed to be modifying[2014-10-13. : 3:18 am] O)FaRTy1billion[MM] -- so like if you have "Photo* pic; pic->id = 5;", pic isn't referencing any actual photo struct[2014-10-13. : 3:17 am] O)FaRTy1billion[MM] -- Oh, he means it's a pointer to a struct for photo, but where is the actual struct?[2014-10-13. : 3:16 am] Dem0n -- Also I'm getting a warning saying my Photo variable pic is uninitialized because I just have Photo* pic; as my declaration. What would I initialize it to if I just want to modify the contents of the struct?[2014-10-13. : 3:12 am] Dem0n -- So would doing pic->description = (char *) malloc(5); and then checking it with if(pic->description == NULL) be the right way to do that?[2014-10-13. : 3:11 am] O)FaRTy1billion[MM] -- show me all the code, I can look to see if I notice something XD[2014-10-13. : 3:09 am] O)FaRTy1billion[MM] -- try jjf's suggestion and just printing it to make sure the problem isn't something else[2014-10-13. : 3:08 am] O)FaRTy1billion[MM] -- jjf28jjf28 shouted: printf(pic->description); // This fails? That should fail. Use puts instead of printf and it will work[2014-10-13. : 3:07 am] O)FaRTy1billion[MM] -- I'll do it today or tomorrow, I just got home from work so I'm feeling particularly lazy ![]() [2014-10-13. : 3:07 am] poiuy_qwert -- not really anything specific. section validation info would be nice, other updated stuff you have as well, but it doesn't really matter much[2014-10-13. : 3:06 am] Dem0n -- Photo *pic. And then I try to do pic->description, where description is a char pointer inside the Photo struct[2014-10-13. : 3:05 am] O)FaRTy1billion[MM] -- poiuy_qwertpoiuy_qwert shouted: FaRTy, update the CHK spec Is there something you need? I pretty much listed the only things I noticed that need updating![]() [2014-10-13. : 3:05 am] Dem0n -- it's just a char pointer, but if I do like var->charptr, it says I'm requesting for member 'charptr' in something not a struct[2014-10-13. : 3:04 am] O)FaRTy1billion[MM] -- oh, it could be like *(thingy->pointer) ... but I'm not sure if the ()s are necessary[2014-10-13. : 3:04 am] jjf28 -- for some reason I thought it only had the deference operator * to work with[2014-10-13. : 3:03 am] Dem0n -- okay so if I have a pointer inside the struct, how do I access that? ![]() [2014-10-13. : 3:03 am] O)FaRTy1billion[MM] -- the only relevant thing I can think of that C doesn't have compared to C++ is referencing. ![]() |