My question is about new syntax introduced in c/cpp standards. Recently I have encountered such syntax:
ssh_cipher *(*new)(const ssh_cipheralg *alg);
The above declaration relates to c standards. What does it means and how write it in cpp?
new is a function pointer to a function that returns an 'ssh_cipher *' and accepts a single parameter of type 'const ssh_cpheralg *'.
Other than the use of a reserved keyword, the code is valid C++. To make it valid it could be rewritten as
ssh_cipher *(*new_function)(const ssh_cipheralg *alg);
many thanks for explanation.
I thought that it is new syntax in c standards.