Home Accessibility Courses Diary The Mouth Facebook Resources Site Map About Us Contact
C - structs and unions, C++ classes and polymorphism

C's structs allow you to define a variable type in which you can hold a variety of elements by name ... and that's very similar to how you define all the variables within a C++ class. In a C++ class, though, you also define your methods which take that language forward into the Object Oriented world.

C's unions let you define a block of memory which has two (or more) names associated with it so that - when combined with structs - you can produce a whole family of defined variable types based on a common core, but then varying in parts where appropriate. In OO terms, that's starting to head towards C++'s inheritance and polymorphism ...
(written 2008-03-13, updated 2008-03-18)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
C209 - C and C based languages - Structures and Unions
  [3386] Adding the pieces together to make a complete language - C - (2011-08-11)
  [3145] Structures v Structure Pointers in C. How, which, why. - (2011-01-25)
  [3122] When is a program complete? - (2011-01-06)
  [2573] C Structs - what, how and why - (2010-01-13)
  [1669] What are Unions (C programming) - (2008-06-08)
  [1584] Using Structs and Unions together effectively in C - (2008-03-21)
  [1478] Some new C programming examples - files, structs, unions etc - (2007-12-19)

C233 - C and C based languages - OO in C++ - beyond the basics
  [3979] Extended and Associated objects - what is the difference - C++ example - (2013-01-18)
  [3811] Associated Classes - using objects of one class within another - (2012-07-21)
  [3508] Destructor methods in C++ - a primer - (2011-11-05)
  [3251] C++ - objects that are based on other objects, saving coding and adding robustness - (2011-04-17)
  [3244] C and C++ - preprocess, compile, load, run - what each step is for - (2011-04-12)
  [3142] Private and Public - and things between - (2011-01-22)
  [3124] C++ - putting the language elements together into a program - (2011-01-08)
  [3123] C++ objects - some short, single file demonstrations - (2011-01-07)
  [3056] C++ - a complete example with polymorphism, and how to split it into project files - (2010-11-16)
  [2845] Objects and Inheritance in C++ - an easy start - (2010-07-01)
  [2577] Complete teaching example - C++, inheritance, polymorphism - (2010-01-15)
  [1819] Calling base class constructors - (2008-10-03)
  [1674] What a lot of files! (C++ / Polymorphism demo) - (2008-06-12)
  [1217] What are factory and singleton classes? - (2007-06-04)
  [925] C++ - just beyond the basics. More you can do - (2006-11-14)
  [831] Comparison of Object Oriented Philosophy - Python, Java, C++, Perl - (2006-08-13)
  [801] Simple polymorphism example - C++ - (2006-07-14)
  [798] References and Pointers in C++ - (2006-07-10)


Back to
Await guests in the early hours
Previous and next
or
Horse's mouth home
Forward to
Budget tax increases hit vehicle market
Some other Articles
Making PHP and MySQL training relevant to the course delegates
Database design for a shopping application (MySQL)
Joining MySQL tables revisited - finding nonmatching records, etc
Budget tax increases hit vehicle market
C - structs and unions, C++ classes and polymorphism
Await guests in the early hours
London Midland ... Merrymaker ... Percy Danks
I dont care - goodbye
What colour is the season?
Melksham - Swindon. Train v Bus v Car
4255 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/1572_C-s ... phism.html • PAGE BUILT: Sun Mar 30 15:20:58 2014 • BUILD SYSTEM: WomanWithCat