Re: Allocating space for char*?

From: Steve (nospam_at_nospam.com)
Date: 01/31/04


Date: Sat, 31 Jan 2004 15:41:23 +1100


Steve wrote:
> Hi,
>
> I have the following structure:
>
>
> typedef struct {
> char *send;
> char *expect;
> int timeout;
> int retryCount;
> } COMMAND;
>
>
> is the following definition ok?
>
> COMMAND = {"hello", "OK", 50, 20}
>
> or should I allocate space for 'send', and 'expect' first? Thanks,
>
>
> Steve
>

I meant, COMMAND hello = {"hello", "OK", 50, 20}

Cheers,

Steve



Relevant Pages

  • Re: User Rights Assignment - not available - Resolved
    ... Thanks Steve for your effort to help me here. ... If none of that works I would try an upgrade/repair install ... it shows user rights and use the Resource Kit command line tool ... This operation may find that this database is corrupt ...
    (microsoft.public.windowsxp.security_admin)
  • Re: how i will open (from Java Application) the MS word format /html documentsin repective Applicati
    ... Thanx Steve for the nice explanation.i'll use this concept in my ... The specific method depends on the presence of a "file manager" type ... I create a URI object around it and use that. ... array by separating the CDE command line at the spaces, ...
    (comp.lang.java.programmer)
  • Re: Creating history record
    ... The reason I need to wait until they hit the save command is that they have ... an undo key if can they change their minds during the update. ... No update, no history. ... "Steve Schapel" wrote: ...
    (microsoft.public.access.macros)
  • Re: ADO with alternate credentials
    ... Set objADOConnection = CreateObject ... > you can set the username and password on an ADO connection like this: ... > Steve wrote: ... >> 'parse domain name and set command vars ...
    (microsoft.public.windows.server.scripting)
  • Re: Does anyone know exactly what the repair function does?
    ... is there a command line version that can be used inside a ... >I ran into a wierd problem on a tricky navy network, and in order to keep my ... >lan connection up, I am forced to monitor it constantly and press the ... Steve Winograd, MS-MVP ...
    (microsoft.public.windowsxp.network_web)