I\'m using cocos2d with objective C. I have a class called CrystalineBubble that is currently empty it inherits from CCNode.
I\'m a little confused about Objective-C and allocating/releasing objects. If I do this: NSString *myString;开发者_运维知识库
Suppose I write my code very defensively and always check the return types from all the functions that I call.
I feel like a novice for asking this question -- but why is it that when I pass the Set below into my method and point it to a new HashSet, it still comes out as the EmptySet?Is it because local varia
I am new to C++.What does it mean exactly to \"new\" a colle开发者_运维问答ction?For example: UnicodeStringList* tmp = new UnicodeStringList;
I have a situation where I need to use some strings temporarily but I\'ve read so many conflicting things that I\'m a bit confused as to what the best way to proceed is.
I just came across a problem where the constructor of a class needs to allocate memory. So I happily wrote char *mem = static_cast<char*>(malloc(100*sizeof(*mem)));. But then I suddenly realized
What is the rig开发者_开发知识库ht and best way to reallocate memory? for example I allocate 100 bytes with WinAPI function HeapAlloc
I have groups of students that need to be allocated into classrooms of a fixed capacity (say, 100 chairs in each).
i made a class named x; so i want to make array of it using dynamic allocation x [] myobjects = new x();