Click here to Skip to main content
15,918,889 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionHow to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu30-Oct-05 23:18
CooperWu30-Oct-05 23:18 
AnswerRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu30-Oct-05 23:22
CooperWu30-Oct-05 23:22 
AnswerRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
toxcct31-Oct-05 0:02
toxcct31-Oct-05 0:02 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
Sheng Jiang 蒋晟31-Oct-05 6:07
Sheng Jiang 蒋晟31-Oct-05 6:07 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu31-Oct-05 22:30
CooperWu31-Oct-05 22:30 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
Johann Gerell31-Oct-05 19:40
Johann Gerell31-Oct-05 19:40 
GeneralRe: How to judge a string encoding is euc, sjis, ascii or others? Pin
CooperWu31-Oct-05 22:30
CooperWu31-Oct-05 22:30 
QuestionSocket Programming question Pin
mdykstra30-Oct-05 6:48
mdykstra30-Oct-05 6:48 
Hi,

Being relatively new to socket programming, I need some assistance in sending and receiving data over a TCP connected socket. I'm familiar with using send and recv commands to send and recv buffered character data, but what about if I want to send and recv data formatted within a structure? For example,

<code>
main ()
{
struct {
int data1;
double data2;
bool indicator;
}msg;

// initialize data
msg.data1 = 0;
msg.data2 = 5.8;
msg.inidicator = false;

// send data
.....

// receive data
.....
}
</code>

Are the send and recv commands the right ones to use for this type of information to send and receive data over a TCP connected socket or are there other commands that are better suited for this. When I use the send(socketfd, (char *)&msg, 0), it "appears" to work, but when receiving the data using recv(socketfd, (char *)&msg, 0), it returns with a -1.

Thanks in advance for any help.
-Martin

NB: The commands must work on both the Windows and UNIX side, so Windows specific commands wouldn't work.


AnswerRe: Socket Programming question Pin
willy_total31-Oct-05 9:33
willy_total31-Oct-05 9:33 
Questionsolve this problem! Pin
sam o neil29-Oct-05 21:02
sam o neil29-Oct-05 21:02 
AnswerRe: solve this problem! Pin
toxcct30-Oct-05 0:58
toxcct30-Oct-05 0:58 
GeneralRe: solve this problem! Pin
sam o neil30-Oct-05 1:19
sam o neil30-Oct-05 1:19 
GeneralRe: solve this problem! Pin
toxcct30-Oct-05 8:07
toxcct30-Oct-05 8:07 
AnswerRe: solve this problem! Pin
mikanu1-Nov-05 12:43
mikanu1-Nov-05 12:43 
QuestionHelp with automatic e-mail Pin
cemaaiem29-Oct-05 11:30
cemaaiem29-Oct-05 11:30 
AnswerRe: Help with automatic e-mail Pin
Brad Bruce29-Oct-05 12:36
Brad Bruce29-Oct-05 12:36 
QuestionDesperate Need of Help in C++.. Pin
MarkoOkuka27-Oct-05 16:39
MarkoOkuka27-Oct-05 16:39 
AnswerRe: Desperate Need of Help in C++.. Pin
Christian Graus27-Oct-05 17:19
protectorChristian Graus27-Oct-05 17:19 
Questionis it stack or heap? Pin
georgemarios27-Oct-05 6:01
georgemarios27-Oct-05 6:01 
AnswerRe: is it stack or heap? Pin
IdUnknown27-Oct-05 6:27
IdUnknown27-Oct-05 6:27 
GeneralRe: is it stack or heap? Pin
georgemarios27-Oct-05 6:40
georgemarios27-Oct-05 6:40 
QuestionHow to generate a custom warning at compile time in C++ Pin
Anonymous26-Oct-05 18:41
Anonymous26-Oct-05 18:41 
AnswerRe: How to generate a custom warning at compile time in C++ Pin
Anonymous27-Oct-05 1:02
Anonymous27-Oct-05 1:02 
QuestionConverting a C++ style string into something execvp can use. Pin
Anonymous26-Oct-05 9:47
Anonymous26-Oct-05 9:47 
AnswerRe: Converting a C++ style string into something execvp can use. Pin
Christian Graus26-Oct-05 10:39
protectorChristian Graus26-Oct-05 10:39 

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.