yup why, if you really want a main class declare one
class Main {
private:
std::string prog;
std::vector<std::string> args;
public:
Main(int argc, char *argv[])
: prog(argv[0]) {
if(argc > 1){
args.insert(args.begin(), &argv[1], argv +
argc);
}
};
int run();
};
// then in main()
int main(int argc, char *argv[]){
Main m(argc, argv);
return m.run();
}
// put all your running code in Main::run() or called from there
// and you have all the beauty and none of the pain of changing
// the language note this also gives you a nice
std::vector<std::string> args;
// etc which some where asking for, again with no language change
--
---
You received this message because you are subscribed to the Google
Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
--
.~. In my life God comes first....
/V\ but Linux is pretty high after that :-D
/( )\ Francis (Grizzly) Smit
^^-^^ http://www.smit.id.au/
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GM/CS/H/P/S/IT/L d- s+:+ a++ C++++ UL++++$ P++ L+++$ E--- W++
N W--- M-- V-- PE- PGP t+ 5-- X-- R- tv b++++ D-
G e++ h+ y?
------END GEEK CODE BLOCK------
http://www.geekcode.com/