Pointers
Pointer • A short haired one
A pointer is a variation on a normal type where the type name is suffixed with an asterisk. For example we could declare a pointer to an integer by writing int*
. We already saw a pointer type char** argv
. This is a pointer to pointers to characters, and is used as input to main
function.
Pointers are used for a whole number of different things such as for strings or lists. These are a difficult part of C and will be explained in much greater detail in later chapters. We won’t make use of them for a while, so for now it is good to simply know they exist, and how to spot them. Don’t let them scare you off!
当前内容版权归 orangeduck 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 orangeduck .