How to pass char* as refrence in a funstion?
ridhimasatam 0 Newbie Poster
Recommended Answers
Jump to Postpass char** which is a pointer to a pointer, like this
void foo( char ** ptr) { *ptr = new char[255]; } int mian() { char *ptr = 0; foo( &ptr ); <snip> return 0; }
Jump to Postbased on these two methods is there any gain over one, is one safer than another?
Jump to PostSeems like someone asked the question, some else read read the answers and followed up with more question and finally someone understood all and thanked. :)
If solved mark the thread as solved..the information provided in this thread has been an awesome resource.
at first i was going …
All 10 Replies
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
thekashyap 193 Practically a Posting Shark
Killer_Typo 82 Master Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
thekashyap 193 Practically a Posting Shark
risa 0 Light Poster
thekashyap 193 Practically a Posting Shark
ridhimasatam 0 Newbie Poster
Killer_Typo 82 Master Poster
~s.o.s~ 2,560 Failure as a human Team Colleague Featured Poster
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.