Liste des Groupes | Revenir à l c |
Expanding on this point, C++ goes to town with pass-by-value interfaces
involving objects. For instance the std::basic_string template allows
C++ programs to treat dynamic strings as just values to be tossed
around:
std::string path_combine(std::string dir, std::string name)
{
return dir + "/" + name;
}
C++ experience informs us that you can get away with doing this
with PODs (plain old datatypes---structs with no constructors
or destructors) only to a point. But in C, that's all you have.
[...]
Les messages affichés proviennent d'usenet.