I have a string and want to use it as struct name dynamically.
struct employee{
atributes ....
}
string name;
cin >>name;
employee "name"
and then use the named employee !
does not work
employee &name = new employee();
does not work
This is not possible in C++. Look at the concept of associative containers to store named references to class/struct instances, for example an std::map<std::string, employee>. This creates a 'map' class mapping string based keys to values of type employee.
Indeed, you can't use run-time string values as variable names. You could use a map to index objects by a string or other key type:
#include <map>
std::map<std::string, employee> employees;
employees[name] = employee();
employee &name = new employee();? C++ is not a language where you can write the first thing that comes to mind (even adapted from another language) and expect it to work. The best course of action isn't someone telling you the exact syntax, but learning from a good introductory book.