int main() { WordT words[10]; int wordCount; ... }
type * identifier; type * identifier, * identifier, ...;
int * intPtr{nullptr}; WordT * wordPtr = nullptr;
int * intPtr = nullptr; WordT * wordPtr{nullptr}; float * floatAry{nullptr}; // assume memory has been set up. *intPtr = 8; cout << *intPtr; wordPtr->Word("hello"); cout << wordPtr->Count(); // assuming there are at least 8 elements in floatAry floatAry[7] = 3.14;
int a; int * intPtr = & a;
int a; int * intPtr = & a; a = 7; *intPtr = 22; cout << a << " " << *intPtr << endl;
void MyFunc(ptrType * & parameter);