Re: Airplane Program with Linked Lists. The linked list portion is very confusing to me.
In article
<5393fda1-6234-49d3-8b82-fa30d09a2353@34g2000hsz.googlegroups.com>,
pandemonium <plavapisma@gmail.com> wrote:
On Mar 9, 6:40 pm, Francis Glassborow
<francis.glassbo...@btinternet.com> wrote:
But C++ is NOT an OOPL; it is a language with built in support for OOP
along with support for a number of other programming styles. Note that
the STL is NOT properly OO, its power comes from generic programming.
Yes, I agree with You that C++(C with Classes) is hybrid language(java
is pure OOPL).
But if it had a OO support, it's good to be used.
Regards.
Not if doing so makes it more complicated:) In this case I see
searching for an empty seat, and seats reserved for a person, This
wants essentially a 2D array for a small course exercise. and that might
be done dynamically with a struct Seat with a couple of test member
functions to be able to use std. lib. routines, and a struct Plane
providing operator [] , begin(),end() refering to the contained vector
so that Planes planes[1000];
planes[i][j]; 'points to a Seat.
and [ planes[i],begin(),planes[i].end() ) is an stl sequence of
Seats in plane i. Now all the searches can be preformed using stl
algorithms in linear time.
--
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]