Click here to Skip to main content
15,881,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Sending binary file through Sockets in WindowsXP Pin
WindowsVsLinux2-Nov-09 2:16
WindowsVsLinux2-Nov-09 2:16 
GeneralRe: Sending binary file through Sockets in WindowsXP Pin
WindowsVsLinux2-Nov-09 7:24
WindowsVsLinux2-Nov-09 7:24 
GeneralRe: Sending binary file through Sockets in WindowsXP Pin
Richard MacCutchan2-Nov-09 7:40
mveRichard MacCutchan2-Nov-09 7:40 
GeneralRe: Sending binary file through Sockets in WindowsXP Pin
WindowsVsLinux2-Nov-09 7:34
WindowsVsLinux2-Nov-09 7:34 
AnswerRe: Sending binary file through Sockets in WindowsXP Pin
CPallini1-Nov-09 23:49
mveCPallini1-Nov-09 23:49 
AnswerRe: Sending binary file through Sockets in WindowsXP Pin
KarstenK2-Nov-09 0:06
mveKarstenK2-Nov-09 0:06 
QuestionHow to clear all the elements of an char array Pin
WindowsVsLinux1-Nov-09 23:16
WindowsVsLinux1-Nov-09 23:16 
AnswerRe: How to clear all the elements of an char array Pin
CPallini1-Nov-09 23:36
mveCPallini1-Nov-09 23:36 
if you need to clear the whole array then you've to do something like
(I assume it is an array of chars)
char foo[]="foo";
memset(foo, '\0', sizeof(foo));

Setting
foo[0]='\0';
is just a shortcut to have a zero-terminated empty string (plus some garbage) into the array, i.e.
char foo[]="foo";
foo[0]='\0';
printf("%s\n", foo);
will output a blank line.
Anyway (and of course) the array content isn't all erased (namely foo[]={'\0', 'o', 'o' };)

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

AnswerRe: How to clear all the elements of an char array Pin
Rajesh R Subramanian1-Nov-09 23:49
professionalRajesh R Subramanian1-Nov-09 23:49 
AnswerRe: How to clear all the elements of an char array Pin
KarstenK2-Nov-09 0:08
mveKarstenK2-Nov-09 0:08 
GeneralRe: How to clear all the elements of an char array Pin
CPallini2-Nov-09 0:15
mveCPallini2-Nov-09 0:15 
JokeRe: How to clear all the elements of an char array Pin
Randor 2-Nov-09 0:20
professional Randor 2-Nov-09 0:20 
JokeRe: How to clear all the elements of an char array Pin
CPallini2-Nov-09 0:27
mveCPallini2-Nov-09 0:27 
JokeRe: How to clear all the elements of an char array Pin
Randor 2-Nov-09 0:41
professional Randor 2-Nov-09 0:41 
QuestionA referral was returned from the server.?? Pin
Kushagra Tiwari1-Nov-09 23:11
Kushagra Tiwari1-Nov-09 23:11 
QuestionRe: A referral was returned from the server.?? Pin
Randor 1-Nov-09 23:32
professional Randor 1-Nov-09 23:32 
AnswerRe: A referral was returned from the server.?? Pin
Kushagra Tiwari1-Nov-09 23:47
Kushagra Tiwari1-Nov-09 23:47 
GeneralRe: A referral was returned from the server.?? Pin
Randor 2-Nov-09 0:03
professional Randor 2-Nov-09 0:03 
GeneralRe: A referral was returned from the server.?? Pin
Kushagra Tiwari2-Nov-09 0:08
Kushagra Tiwari2-Nov-09 0:08 
GeneralRe: A referral was returned from the server.?? Pin
Randor 2-Nov-09 0:26
professional Randor 2-Nov-09 0:26 
GeneralRe: A referral was returned from the server.?? Pin
Kushagra Tiwari2-Nov-09 0:32
Kushagra Tiwari2-Nov-09 0:32 
QuestionRe: A referral was returned from the server.?? Pin
Kushagra Tiwari2-Nov-09 0:47
Kushagra Tiwari2-Nov-09 0:47 
AnswerRe: A referral was returned from the server.?? Pin
Randor 2-Nov-09 0:52
professional Randor 2-Nov-09 0:52 
GeneralRe: A referral was returned from the server.?? Pin
Kushagra Tiwari2-Nov-09 1:19
Kushagra Tiwari2-Nov-09 1:19 
GeneralRe: A referral was returned from the server.?? Pin
Randor 2-Nov-09 1:47
professional Randor 2-Nov-09 1:47 

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.