It will work as Item::setName(nullptr); because local variables are hiding member variables.
In your second code snippet you are initializating name through member initialization list and is nothidden by locals.
You could also do this->name = nullptr; in your first snippet.
There member variable index will be set to the value of local value (argument) index. What to initialize in init lists will be always treated as member variable. To what might be another member variable, argument, global variable... it uses normal scoping rules.