From: William Djaja Tjokroaminata Date: 2002-10-26T00:05:14+09:00 Subject: Re: rb_gc_register_address problem Hi Paul, Paul Brannan wrote: > The function is designed to take argc and argv from main() and to remove > from argv the arguments that the rest of the program does not need to > see. This just made me realize that probably main() in C++ is still following the C style. I guess it is indeed very hard for C++ to be free from its C legacy. > The fact that argc and argv can be modified is by design. > And you are right; the original vector is not valid, unless I do: > args.erase(args.begin() + argc, args.end()); > which the program includes but I left out from my post. Thanks. I learn some new techniques in combining C++ and C. > I don't know anywhere that it is implemented differently. Perhaps there > is a language lawyer out there who has done it just to make a point. I guess so, I guess so... :) Regards, Bill