Re: Automatically generate variables



Mark McIntyre wrote:
On Wed, 14 Feb 2007 00:25:45 +0100, in comp.lang.c , jacob navia
<jacob@xxxxxxxxxxxxxxxx> wrote:

Mark McIntyre wrote:
On 13 Feb 2007 08:35:59 -0800, in comp.lang.c , "Nate"
<nverbeek@xxxxxxxxxxxxx> wrote:


Hello,

I am looking for a method to automatically declare variables in C.
I'm not sure if there is a good way to do this,

There isn't - you can't define object names at runtime in C.


Wrong

Right.

Agreed.

#include <stdio.h>
#include <windows.h>

Beep beep. This isn't C.

void *h = LoadLibrary("variables.dll");
fn = (void (*fn)(int))GetProcAddress("GetDynamicObject");

This isn't either.

Nonsense. It is C. It's not strictly conforming, it won't work
almost anywhere, it's rather useless, it's off-topic here, all this
was in details explained in another reply to JN post. But it is C,
where "C" means "C language as defined by the ISO standard".

Yevgen
.