Re: [C] simple string question
From: AirPete (x_at_x.x)
Date: 02/05/04
- Next message: Chris \( Val \): "Re: Input string vs. char array"
- Previous message: AirPete: "Re: [C] simple string question"
- In reply to: Alan: "Re: [C] simple string question"
- Next in thread: Leor Zolman: "Re: [C] simple string question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 05 Feb 2004 13:02:47 GMT
Alan wrote:
[snip]
>>
>> memcpy("abcd", string, sizeof(string));
>
> sorry, but it doesn't work
> when I run the program, the program crashes
Sorry, I got the arguments misordered, it should be:
memcpy(string, "abcd", sizeof(string));
>
>>
>> - Pete
- Next message: Chris \( Val \): "Re: Input string vs. char array"
- Previous message: AirPete: "Re: [C] simple string question"
- In reply to: Alan: "Re: [C] simple string question"
- Next in thread: Leor Zolman: "Re: [C] simple string question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|