Hiii....
I am stuck here..
I want a function which can return a string and also it should be able to take DEFAULT string arguments....
can anyone help me wid d syntax??
akand 0 Newbie Poster
Recommended Answers
Jump to Postnbaztec, this is the C forum. C++ does not work here. ;)
> I want a function which can return a string and also it should be able to take DEFAULT string arguments....
C does not support either default arguments or function overloading, so the simple answer is you …
Jump to PostWell I know that C supports none. But I wanted to help the OP rather than shoo him off to C++ forum. :)
This thread can(should) be moved right?
Jump to Post> This thread can(should) be moved right?
Why? It is not confirmed that the OP even *wants* C++, and errors in compiling your sample code strongly suggests that he is trying to compile as C. Ed is not convinced that "use C++" is the right answer to the question here.
Jump to Post> Well the OP wants default arguments, which he can't get in C
It is not always practical to switch programming languages, even when the languages are highly compatible like C and C++. The OP is using C for a reason, and we should not dismiss his choice so readily. …
Jump to Post> who is this OP and Ed???
OP is you, and Ed is Edward. :)
All 20 Replies
nbaztec 45 Posting Pro in Training
akand 0 Newbie Poster
akand 0 Newbie Poster
nbaztec 45 Posting Pro in Training
nbaztec 45 Posting Pro in Training
akand 0 Newbie Poster
nbaztec 45 Posting Pro in Training
akand 0 Newbie Poster
nbaztec 45 Posting Pro in Training
akand 0 Newbie Poster
Radical Edward 301 Posting Pro
nbaztec 45 Posting Pro in Training
Radical Edward 301 Posting Pro
akand 0 Newbie Poster
nbaztec 45 Posting Pro in Training
Radical Edward 301 Posting Pro
akand 0 Newbie Poster
nbaztec 45 Posting Pro in Training
Radical Edward 301 Posting Pro
nbaztec 45 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.