There are several ways to generate dictionaries in ROOT, the simplest is probably to create a LinkDef.h file like explained here, e.g.:
// MyClass.h
#include <string>
#include <vector>
struct User {
int n;
std::string foo;
};
class MyClass {
std::vector<User> Nclust[10];
};
// LinkDef.h
#ifdef __CLING__
#pragma link C++ class MyClass+;
#endif
and then from the commandline rootcling myclass_dict.cxx myclass.h LinkDef.h and then when compiling you should link myclass_dict.cxx to the library/executable that needs to read/write MyClass.