How do I declare a Const. as a Varible of a different type.

Sharma Anupindi n077gh at tamuts.tamu.edu
Thu May 23 06:48:19 AEST 1991


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 at tamuts.tamu.edu



More information about the Comp.unix.questions mailing list