Re: Allocating space for char*?
From: Steve (nospam_at_nospam.com)
Date: 01/31/04
- Next message: E. Robert Tisdale: "Re: difference"
- Previous message: CBFalconer: "Re: Troll Alert: Christian Bau"
- Next in thread: Jack Klein: "Re: Allocating space for char*?"
- Reply: Jack Klein: "Re: Allocating space for char*?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: E. Robert Tisdale: "Re: difference"
- Previous message: CBFalconer: "Re: Troll Alert: Christian Bau"
- Next in thread: Jack Klein: "Re: Allocating space for char*?"
- Reply: Jack Klein: "Re: Allocating space for char*?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|