Originally Posted by
baxy77bax
// Here i would like for my string to be either SSeq of QSeq.
[/code]
Is something like tjis even possible in c ???
It actually is under C99, but then the variable goes out of scope, if you see what I mean:
Code:
if (*type == 'S'){
SSeq *string = NULL;
}
else if (*type == 'Q'){
QSeq *string = NULL;
}
// Here is where "string" does not exist, since it was declared
//in a block scope and we are not inside the block anymore
So kind of useless. Depending on what you are trying to do, you could accomplish the same thing with a void pointer and some casting.