I am somewhat new to C/C++, so lets say I have a simple struct:
struct item {
int* address;
std::string name;
}
- Is
int*the correct datatype to hold a memory address? Can I just use something like:
item i;
i.address = &i.;To set the structs attribute to it's own address?
Aucun commentaire:
Enregistrer un commentaire