Re: Passing String to Function
- From: Flash Gordon <spam@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 31 Dec 2005 15:43:54 +0000
jconnort@xxxxxxxxxxxxxxxx wrote:
I'm sure this is newbie but I've done some searching on this and haven't found the exact same situation. Basically, I'm trying to pass a string to a function where it get's built up (it's supposed to be a where clause for a a database query) and in the called function it get's built up with malloc as necessary. The problem is, I can't get it to have the proper value when it comes back to the called function. Initially, it's just a pointer to char. Can anyone point me to an FAQ or some such ? Thanks...
Try changing the * to a ** on line 42. Or, in other words, how can we tell you what you have done wrong if you don't show us what you have done?
You might find this FAQ useful though: http://c-faq.com/ptrs/passptrinit.html
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
.
- References:
- Passing String to Function
- From: jconnort@xxxxxxxxxxxxxxxx
- Passing String to Function
- Prev by Date: Re: An Link Error
- Next by Date: Re: Adding the ability to add functions into structures?
- Previous by thread: Passing String to Function
- Index(es):
Relevant Pages
|