Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Cpp create file, java read it, how to do this

 
James Lumei
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need create a text file by using C++ and then read the file back by using Java. The file will be a text file contains numbers. I have some problems to do this. What I read from the file is not what I expected. I think probably it caused by the sizes of numbers, such as int and double, are not the same in C++ and Java. Is there a way to workaround?
thank you,
James
 
Jim Bertorelli
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you store the numbers in plain text (ASCII) as comma separated values? It will be pretty straight forward to write and read in any language and platform.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!