Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > (Un)compatibility between files generated from C++ and Java

Reply
Thread Tools

(Un)compatibility between files generated from C++ and Java

 
 
Maria
Guest
Posts: n/a
 
      12-17-2004
Hi
is there (Un)compatibility between files generated from C++ and Java?
i think there is since the datatypes can have different
representation. In Java for instance integer type takes 4 bytes,
whereas it is just 2(i think!) in C++
so when writing in a language and reading the generated integer file
with other language mismatch occurs?

what about strings-type files (un)comaptibility between the two
languages?

is it worse between Java (C++) and Cobol/pascal?

if you can give me examples i 'll be delighted

thanks
 
Reply With Quote
 
 
 
 
Joona I Palaste
Guest
Posts: n/a
 
      12-17-2004
Maria <(E-Mail Removed)> scribbled the following:
> Hi
> is there (Un)compatibility between files generated from C++ and Java?
> i think there is since the datatypes can have different
> representation. In Java for instance integer type takes 4 bytes,
> whereas it is just 2(i think!) in C++
> so when writing in a language and reading the generated integer file
> with other language mismatch occurs?


> what about strings-type files (un)comaptibility between the two
> languages?


> is it worse between Java (C++) and Cobol/pascal?


> if you can give me examples i 'll be delighted


Files do not carry inherent notions of what created them. The exact same
kind of file can be created by Java, C++, COBOL, Pascal, assembler,
whatever.
It is true, as you say, that Java and C++ can have different-sized
integers, but this is not a problem. As long as you realise what sizes
different languages have for integers, you can develop a system of
always writing integers the same way. Every language has a way of
writing individual bytes. Just use this to write integers in a uniform
way across languages.

--
/-- Joona Palaste ((E-Mail Removed)) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"B-but Angus! You're a dragon!"
- Mickey Mouse
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Differentiate between user caused events and script generated events jmpinchot@gmail.com Javascript 1 04-27-2007 03:05 AM
using generated java code in Java applets juraj Java 1 03-02-2007 04:41 PM
difference between compiler generated destructor and class implemented arun C++ 2 06-12-2006 09:39 PM
difference between compiler generated destructor and class implemented arun C++ 0 06-12-2006 05:34 PM
3 .class files generated for 1 .java file qazmlp Java 14 01-19-2004 03:39 PM



Advertisments