how do I declare a constant as a variable of different type
Ivan S. Leung
isl at fmi.uunet.uu.net
Fri May 24 00:58:52 AEST 1991
In article <16452 at helios.TAMU.EDU> n077gh at 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
More information about the Comp.unix.questions
mailing list