B
Billy Patton
Not sure if the description is correct.
I want to do something like:
char* x(int x=3);
int main(void) { printf("something = '%s'\n",x()); }
char* x(int x) { return (x==3)?"3":"1";}
From my limited use of c++ I know this is possible in c++.
Is this possible in c. I'm unable to use c++ and must use c.
please respond via email instead of posting to this news group.
___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodlogy Group
Dallas, Texas, 214-480-4455, (e-mail address removed)
I want to do something like:
char* x(int x=3);
int main(void) { printf("something = '%s'\n",x()); }
char* x(int x) { return (x==3)?"3":"1";}
From my limited use of c++ I know this is possible in c++.
Is this possible in c. I'm unable to use c++ and must use c.
please respond via email instead of posting to this news group.
___ _ ____ ___ __ __
/ _ )(_) / /_ __ / _ \___ _/ /_/ /____ ___
/ _ / / / / // / / ___/ _ `/ __/ __/ _ \/ _ \
/____/_/_/_/\_, / /_/ \_,_/\__/\__/\___/_//_/
/___/
Texas Instruments ASIC Circuit Design Methodlogy Group
Dallas, Texas, 214-480-4455, (e-mail address removed)