OK, that's what I thought although I don't often get error messages in German
inside class S means: 'grant A access to the private members of S'
The problem is that you have said 'grant Z access to private members of S' and then tried to access private members of S from A
try changing your friend declaration to
friend template<> void shows( T& );
unfortunately this depends on your exact compiler version. In some it might have to be:
friend template void shows( T& );
friend template void shows< int >( students< int >& );
friend template void shows<>( T& );
and in some it will not work however you write it.
This I'm afraid is the confused state of C++ compilers when it comes to combining templates with friends.
Be gald you're not trying to export any of this on the interface of a shared library or it all gets much worse.