Path: csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Thu, 10 Nov 2016 15:58:56 -0600 From: Gareth Owen Newsgroups: comp.lang.c Subject: Re: Compiler design in C? References: <3e47c9bc-1c0a-40dc-9dc3-92e88ace6c31@googlegroups.com> <87lgwrzvqt.fsf@gmail.com> <87lgwrdaiu.fsf@gmail.com> <87shqz7n08.fsf@gmail.com> <362fc76e-f4aa-4c66-abfd-ea4e8d87da47@googlegroups.com> <87y40ruk7u.fsf@gmail.com> Date: Thu, 10 Nov 2016 21:58:57 +0000 Message-ID: <87bmxnngim.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:1a5ukoBj3uWZbTRn8dl8ID9kaJk= MIME-Version: 1.0 Content-Type: text/plain Lines: 22 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-J1tMy7RLOH1g3zvUCkGJ2gNg3KYBSPYcxwagqA9ISlanVvaMa/w/cdH09PBA1CLO/1KvpcSxCdnBZq5!5kmoIdf2vv8d1DOyM8yzEXBfo3oDQOIGgvpu2cYx/c3tctIjOubdzlEl6sAHHCPG954s X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2333 Xref: csiph.com comp.lang.c:96352 jacobnavia writes: > Look, you are effectively missing some context here. This function is > included in a small C file that > > #define ElementType MyPieceOfData > > where "MyPieceOfData" can be a type you use whatever. > > Then you compile your small file > #include "valarraygen.c" > > and your type will have a vector-array for it, complete with a > standard interface. You can put the code in a library and only the > functions that you use will get included in the final executable. How do I have two similar containers with dissimilar types in the same function? > Not very difficult Mr Thompson. Nowhere near as simple as C++ though.