Xref: utzoo comp.lang.c:34819 comp.lang.c++:10808 Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!fmrco!harold From: harold@fmrco (Harold Naparst) Newsgroups: comp.lang.c,comp.lang.c++ Subject: Programming Challenge Message-ID: <1990Dec15.015355.15683@fmrco> Date: 15 Dec 90 01:53:55 GMT Sender: harold@fmrco (Harold Naparst) Organization: Fidelity Investments, Boston, MA 02109 Lines: 15 I am trying to write a function which will return the index of the smallest element of an array. I want the routine to work for any type array. That is, I don't want to write a separate routine for each type of array (real or double or integer). How can I do this ? I tried playing around with the GNU C typeof operator, but couldn't figure it out. Any ideas ? Harold Naparst (uunet!fmrco!harold) -- Harold Naparst (uunet!fmrco!harold) Fidelity Management Trust Co. (617)-570-2587 82 Devonshire St., #I40F The opinions expressed herein are not those Boston, MA 02109 of my employer.