|
From: Devin C. <dcc...@ya...> - 2002-02-16 16:16:55
|
> Be patient, Dev-C++ 5 is coming. Good. :) Though, bugs aside, I rather like Dev-C++ 4. > > I'm having enough > > trouble with C++'s noodleheaded view of aggregate data > > objects; this really isn't helping. > > > What trouble. Initializing an array/vector of objects, of which some of the members are consts. That was my first problem. My second was push_back() decided to stop working. (This led me to look somewhat askance at vectors, and I still see them as exceedingly finicky things.) Initializing a vector to anything interesting including constants without using push_back() is difficult; I ultimately solved the problem by ripping out almost every const in my project (not without some satisfaction) and using a Set() function. (I implemented a rudimentary sort of data protection by only allowing anything to be changed if the Name member was set to the constant NULLSTR.) I've also had problems initializing vectors from arrays. Vectors can be initialized in a wonderful panoply of ways, all of which are thoroughly useless for my purposes. It's recently occurred to me that this is probably a job for an overloaded assignment operator. I'm not certain how to do this for a vector (while vectors are finicky, templates are just plain sticky, and I haven't read much about them because I don't expect to need them for a while.) Most of my problems, I can see, stem from the fact that I learned (and loved) C long before ever setting eyes on C++. (My first reaction to C++ was 'They've turned something beautiful into a hideous bloated beast.') So I despise references with a hate the KKK can only dream of achieving, find consts to be a pain in the colon that extends all the way up the intestines, and find C++ is excessively schoolmarmish about initialization. (Don't get me wrong - I adore classes, inheritance, polymorphism and even strong typing. On the whole, it's a much better language. --Devin Carless (Wow. I didn't plan on ranting that much.) _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |