Re: Passing String to Function



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.
.




Relevant Pages

  • Passing String to Function
    ... I'm sure this is newbie but I've done some searching on this and ... haven't found the exact same situation. ... string to a function where it get's built up (it's supposed to be a ... get's built up with malloc as necessary. ...
    (comp.lang.c)
  • Re: OT: Iraqi elections
    ... > length of string from one corner to the opposing corner, ... the ancient pyramids of Egypt could only have been built by aliens were: ... * To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: OT: Iraqi elections
    ... > length of string from one corner to the opposing corner, ... the ancient pyramids of Egypt could only have been built by aliens were: ... You simply flood it and fill in the low spots and level off the high areas. ...
    (comp.sys.hp.mpe)
  • Re: Larkin, Power BASIC cannot be THAT good:
    ... features you need built in? ... our ethernet-version products. ... tcp/ip session, one line to send a string, one line to get a string, ... All built in, called with plain English words (like ...
    (sci.electronics.design)
  • Re: Data Type mismatch with autonumber
    ... Rather than use a msgbox to grab the text that you've built... ... Toggle Breakpoint) on the next line after your ... That will give you your built string. ... Start a new query, then View, ...
    (microsoft.public.access.formscoding)