I am starting working with C++ language and I have the following doubts:
1. Is there any difference when I specify the following members within a class ?
class TExample :
{
private:
TList * ListExample1; //TList is a class
TList *ListExample2; //TList is a class
TList* ListExample3; //TList is a class
Is there any difference among the declarations of ListExample1, ListExample2 and ListExample3 ?
Or do all declarations mean a pointer to TList written in different ways ?
2. I'd like to ask the same question for declaration of functions:
int* ptr1, ptr2;
// is the same as...
int *ptr1, ptr2;
// is the same as...
int* ptr1;
int ptr2;
I never liked that about C/C++. * should be part of the type, not part of the variable. They really should both be pointers. Chalk this up to a language flaw.