🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Sven Heinicke Sat, 15 Jun 1991 22:53
declaring defines.
#1
Author: Sven Heinicke
Date: Sat, 15 Jun 1991 22:53
29 lines
1008 bytes
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@cs.widener.edu                                  Widener CS system manager
Sven Mike Heinicke                                          and Student
(pssmheinicke@cyber.widener.edu (if you must))
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads