Answer the question
In order to leave comments, you need to log in
What is the difference between void and Id in objective-c?
As I understand it, they are both used when an undefined type is needed, so what's the difference?
Answer the question
In order to leave comments, you need to log in
Did you mean void* ?
The difference is that id is a pointer to objective - c objects, while void* is a pointer to an undefined type, or just a memory area (which can store anything).
stackoverflow.com/questions/1304176/objective-c-di...
id is an objective-c object
void is void/nothing in C
void* is a pointer to a variable of unknown type in C
To be more precise, id is a pointer to the object structure in objective-c.
If you are very interested, you can see more details in usr/include/objc/objc.h
/// Represents an instance of a class.
struct objc_object {
Class isa OBJC_ISA_AVAILABILITY;
};
/// A pointer to an instance of a class.
typedef struct objc_object *id;
There was a need to purchase a new UPS.Maybe replacing the batteries will help (much cheaper)?
It remains to decide on the companyPowercom VANGUARD RM VRT-2000XL
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question