Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!tamuts.tamu.edu From: n077gh@tamuts.tamu.edu (Sharma Anupindi) Newsgroups: comp.unix.questions Subject: How do I declare a Const. as a Varible of a different type. Message-ID: <16435@helios.TAMU.EDU> Date: 22 May 91 20:48:19 GMT Sender: usenet@helios.TAMU.EDU Organization: Texas A&M University Lines: 21 Hai, Is there a way of declaring a constant as a variable of a different type. it is something like the intern function of lisp. for example; char name[20] = {"sharma"}; int sharma; here I stored "sharma" in the var, name. But in my problem I read the string from a data file and store them in the var name which is the elemet of a struct. that is something like struct[1].name="ghjghj" and struct[2].name="hgjghj". And after reading them from a file I should declare the strings as a variable of different type ( like int in the example). I would like to have this in `C', and if it is not possible in `C', C++ will also do. Sharma. n077gh@tamuts.tamu.edu