Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: display image in CListctrl Pin
Code-o-mat2-May-09 5:18
Code-o-mat2-May-09 5:18 
QuestionTIME_ZONE_INFORMATION structure Pin
Elsie2-May-09 1:39
Elsie2-May-09 1:39 
QuestionRe: TIME_ZONE_INFORMATION structure Pin
David Crow2-May-09 5:57
David Crow2-May-09 5:57 
QuestionClient_Server query. Pin
Le@rner2-May-09 1:26
Le@rner2-May-09 1:26 
Questionhow to hide a window Pin
tyr20002-May-09 0:34
tyr20002-May-09 0:34 
AnswerRe: how to hide a window Pin
Elsie2-May-09 1:47
Elsie2-May-09 1:47 
GeneralRe: how to hide a window Pin
tyr20002-May-09 2:39
tyr20002-May-09 2:39 
GeneralRe: how to hide a window Pin
Elsie2-May-09 2:43
Elsie2-May-09 2:43 
GeneralRe: how to hide a window Pin
Elsie2-May-09 3:11
Elsie2-May-09 3:11 
GeneralRe: how to hide a window Pin
tyr20003-May-09 2:01
tyr20003-May-09 2:01 
QuestionRe: how to hide a window Pin
David Crow2-May-09 5:59
David Crow2-May-09 5:59 
AnswerRe: how to hide a window Pin
tyr20003-May-09 2:00
tyr20003-May-09 2:00 
GeneralRe: how to hide a window Pin
David Crow3-May-09 15:16
David Crow3-May-09 15:16 
GeneralRe: how to hide a window Pin
tyr20004-May-09 4:06
tyr20004-May-09 4:06 
QuestionWriting raw data in byte form to Network Adapter w/ C++ Pin
TheScientistIsDead1-May-09 20:59
TheScientistIsDead1-May-09 20:59 
AnswerRe: Writing raw data in byte form to Network Adapter w/ C++ Pin
Code-o-mat1-May-09 22:50
Code-o-mat1-May-09 22:50 
AnswerRe: Writing raw data in byte form to Network Adapter w/ C++ Pin
Jonathan Davies2-May-09 3:23
Jonathan Davies2-May-09 3:23 
AnswerRe: Writing raw data in byte form to Network Adapter w/ C++ Pin
TheScientistIsDead2-May-09 7:54
TheScientistIsDead2-May-09 7:54 
Questionhelp with implementation of strspn( ) Pin
kaku_lala1-May-09 15:44
kaku_lala1-May-09 15:44 
QuestionRe: help with implementation of strspn( ) Pin
David Crow1-May-09 16:11
David Crow1-May-09 16:11 
AnswerRe: help with implementation of strspn( ) Pin
Stuart Dootson1-May-09 16:15
professionalStuart Dootson1-May-09 16:15 
Questionwhat is wrong with this code snippet - memset() implementation Pin
kaku_lala1-May-09 15:42
kaku_lala1-May-09 15:42 
AnswerRe: what is wrong with this code snippet - memset() implementation Pin
Stuart Dootson1-May-09 16:11
professionalStuart Dootson1-May-09 16:11 
How are you using the function? It looks OK to me and works fine when used as per its signature, like so:

#include <iostream>

void *memset(char *s, char c, size_t n)
{
  size_t i;
  for (i = 0; i < n; i++, s++)
  {
    *s = c;
  }
  return s;
}

int main(int, char**)
{
   char p[100] = {0};
   memset(p, 'd', 10);
   std::cout << p << std::endl;
}


Compiles, links and runs OK (as I would expect) with gcc 4.0.1.

[edit]
kaku_lala wrote:
Return s.

That's the bit that your program probably doesn't do according to the spec (although the spec as given is ambiguous, to be honest).
[/edit]

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

AnswerRe: what is wrong with this code snippet - memset() implementation Pin
David Crow1-May-09 16:15
David Crow1-May-09 16:15 
AnswerRe: what is wrong with this code snippet - memset() implementation Pin
Joe Woodbury1-May-09 19:32
professionalJoe Woodbury1-May-09 19:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.