Hi,
I've got to write a BASIC to C++ converter and came across the problem of
the DATA statement.
I must provide a way of storing:
DATA 5.123, "abc", ...
in C++.
my first guess was this:
struct
{
double* pD;
const char* pC;
} str[2]={
{NULL, "xy"},
{&123.4, NULL},
};
but &123.4 is not possible. Now, having temporary global variables for this
doesn't make me too happy either.
Is there a "clean" way of doing this?
--
------------------------------------
Gernot Frisch
I've got to write a BASIC to C++ converter and came across the problem of
the DATA statement.
I must provide a way of storing:
DATA 5.123, "abc", ...
in C++.
my first guess was this:
struct
{
double* pD;
const char* pC;
} str[2]={
{NULL, "xy"},
{&123.4, NULL},
};
but &123.4 is not possible. Now, having temporary global variables for this
doesn't make me too happy either.
Is there a "clean" way of doing this?
--
------------------------------------
Gernot Frisch
Comment