Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

null terminated string for C++ Client  RSS feed

 
Kevin Nilson
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Java server is using sockets to send a message to a c++ client. I need to make a null terminated string to be read by a C++ Client. Does anyone have any suggestions on how to make a null terminated string. :roll:
 
David Weitzman
Ranch Hand
Posts: 1365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the escape code \u0000 or something like "char nullChar = (char) 0;"
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!