Newsgroups: comp.unix.questions Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!fmi!isl From: isl@fmi.uunet.uu.net (Ivan S. Leung) Subject: Re: how do I declare a constant as a variable of different type Message-ID: <1991May23.145852.13033@fmi.uunet.uu.net> Reply-To: isl@fmi.UUCP (Ivan S. Leung) Organization: Facsimile Marketing, Inc. References: <16452@helios.TAMU.EDU> Date: Thu, 23 May 1991 14:58:52 GMT In article <16452@helios.TAMU.EDU> n077gh@tamuts.tamu.edu (Sharma Anupindi) writes: >>>I would like to have this in `C', and if it is not possible in `C', C++ will >>>also do. > Doug Gwyn: >>I honestly could not make heads nor tails of your question. >>It appeared to me that your main problem is in attempting to use C >>without understanding C first. I'd suggest studying a good C text >>(such as Kernighan & Ritchie's "The C Programming Language"), then >>restating any remaining question in terms that make sense. > > Thanks for the suggestion. > I tried my best to make the problem as clear as possible. You did not get it. >Any way I will try explain it once again ( though i really do not see any point in explaining >it once again to u). > > I read a string ( which is unknown prior to readig ) into character variable. >like: > char name[30]; > fsacnf(fp,"%s",name); >Now I want to declare the string I have read from the file as a different variable. >Ex: > If my file contains the string "Mr.Brilliant", then name will contain the same >string. >Now I want to declare "Mr.Brilliant" as a integer, for further use in the program. >And I wanted to know how to do that. > >If u still donot get it, I am sorry for u and also for myself. > >Sharma. Sharma, you should be sorry for me, too, cos I've programmed in C for a while and still don't get your question. :-) -- Ivan Leung ...!uunet!fmi!isl