N
No Such Luck
Is there anyway to literally evaluate the contents of a string in an if
statement?
For example:
int i = 0;
char * str = "i == 0";
if(str) /* I know this doesn't do what I want */
{
...
}
would be the same as:
int i = 0;
if(i == 0)
{
...
}
The general application is that I'm in interested in reading if
conditionals from a file, not only the conditional variables but the
conditional operators as well (the whole phrase).
Any ideas appreciated.
Thanks.
statement?
For example:
int i = 0;
char * str = "i == 0";
if(str) /* I know this doesn't do what I want */
{
...
}
would be the same as:
int i = 0;
if(i == 0)
{
...
}
The general application is that I'm in interested in reading if
conditionals from a file, not only the conditional variables but the
conditional operators as well (the whole phrase).
Any ideas appreciated.
Thanks.