declaring defines.

Sven Heinicke sven at cs.widener.edu
Sun Jun 16 08:53:30 AEST 1991


Hi, I got this to work no problem:

#include <stdio.h>
#define TRY "look","at","this",NULL
main()
{
  char *first[] = {TRY};
  int i;
  for(i = 0;first[i] != NULL;i++)
    printf("%s\n",first[i]);
}

That works fine.
This does not work, is there any way to get something like this to compile?

#include <stdio.h>
#define TRY {"look","at","this",NULL},{"and","this","too",NULL}
main()
{
  char *first[][] = {TRY};
.  .  .
}


-- 
sven at cs.widener.edu                                  Widener CS system manager
Sven Mike Heinicke                                          and Student
(pssmheinicke at cyber.widener.edu (if you must))



More information about the Comp.lang.c mailing list