Problem with array of enum of strings
#1

I have this code:

Код:
enum infoTema2 {
	nombre[128],
	url[128]
};

new TEST[][3][infoTema2] =
{
	{
	    {"NOMBRE DEL TEMA 1A", "URL DEL ENLACE AL TEMA 1A"},
	    {"NOMBRE DEL TEMA 2A", "URL DEL ENLACE AL TEMA 2A"},
     	    {"fin", "fin"}
 	},
	{
	    {"NOMBRE DEL TEMA 1B", "URL DEL ENLACE AL TEMA 1B"},
	    {"NOMBRE DEL TEMA 2B", "URL DEL ENLACE AL TEMA 2B"},
     	    {"fin", "fin"}
 	}
};

main()
{
	printf(TEST[0][0][nombre]);
}
I thought it would print NOMBRE DEL TEMA 1A but it prints ' DEL TEMA 1A'

What am I doing wrong?
Reply


Messages In This Thread
Problem with array of enum of strings - by trollkemada - 03.04.2013, 22:13
Re: Problem with array of enum of strings - by Jefff - 03.04.2013, 22:39
Respuesta: Problem with array of enum of strings - by trollkemada - 03.04.2013, 22:43
Re: Problem with array of enum of strings - by Jefff - 03.04.2013, 23:08
Respuesta: Problem with array of enum of strings - by trollkemada - 03.04.2013, 23:20
Respuesta: Problem with array of enum of strings - by trollkemada - 04.04.2013, 01:25

Forum Jump:


Users browsing this thread: 2 Guest(s)