QueryCAT Logo
Search 5,000,000+ questions and answers.

Frequently Asked Questions

How can I interface to C / Java?

scheme-faq-standards
Most Schemes support a so-called "foreign function interface" (FFI) to the native language (i.e. the language in which the Scheme interpreter/compiler was implemented). FFIs provide the following features: Calling native code from Scheme The most basic FFIs allow you to write functions/methods following certain conventions and then call these native functions/methods from Scheme.

How do the Java, Perl, Python, Ruby, ... interfaces differ from the C interface?

NetCDF FAQ
They provide all the functionality of the C interface, using appropriate language conventions. There is no difference in the on-disk format for data written from the different language interfaces. Data written by a C language program may be read from programs that use other language interfaces, and vice-versa.

Is a C# interface the same as a C++ abstract class?

Andy Mc's C# FAQ for C++ programmers
No, not quite. An abstract class in C++ cannot be instantiated, but it can (and often does) contain implementation code and/or data members. A C# interface cannot contain any implementation code or data members - it is simply a group of method names & signatures. A C# interface is more like a COM interface than a C++ abstract class.

Q9. What is the history of the IEEE POSIX 1003.1 System Application Interface (C API) ?

POSIX.1 FAQ
Historically, POSIX 1003.1 has been the base standard upon which the POSIX family of standards has been built. In keeping with its original focus on the UNIX system, it is aimed at interactive timesharing computing environments. The first edition of IEEE Std 1003.1 was published in 1988. Subsequent editions were published in 1990, 1996 and 2001. The 1990 edition was a revision to the 1988 edition and became the stable base standard onto which further amendments were added.

How do I interface to C++ objects from Python?

Extending/Embedding FAQ
Depending on your requirements, there are many approaches. To do this manually, begin by reading the "Extending and Embedding" document. Realize that for the Python run-time system, there isn't a whole lot of difference between C and C++ -- so the strategy of building a new Python type around a C structure (pointer) type will also work for C++ objects. For C++ libraries, you can look at SIP, CXX, Boost, or Weave. SWIG is a similar automated tool that only supports C libraries.

Do I need to know C++ before Java?

Java and C++ are meant for two different purposes. Of course they are two widely used OOPLs (Object Oriented Programming Languages). Knowing one is not a prerequisite to another. However, C is the prerequisite to both these language as these two use the same control structures of C.

How to communicate between Java and C++?

FAQ on C/C++/Unix by Roseanne Zhang, Java Programmer Certifi...
Socket: you can pass any information from C/C++ to Java or Java to C/C++. However, if you want to call each other's method/function. You will find out you need to you need to marshal and unmarshal your methods by yourself. You're creating your own protocols. You'd be better off use CORBA. Corba is just for what you want, you use IDL to write your the function or methods, then compile it to C/C++ and Java to use.

Why is Kannel written in C and not in Java?

Kannel: Open Source WAP and SMS Gateway
The Kannel team does not have a strong expertise in Java, so re-implementing Kannel in Java would require us to spend weeks learning the language well. The re-implementation work itself would also take some months. There is no point in doing this.

Why do you not teach C++ or JAVA?

FAQ
Even though we have on staff several teachers who have computer science/programming backgrounds, we feel that these are not appropriate languages to teach the concepts of programming and have kids create a project on their own that they can be proud of. The software we use have been given numerous awards by educational technology magazines and are chosen as to their merit to teach programming.

What is the difference between Java and C++?

Java Language FAQs
Java is a roubust and platform independent language which is used to develop business and internet applications. Function and class Templates. Java has Generics (which are simlar to Templates though not same) in version 5.0

How does the C++ interface differ from the C interface?

NetCDF FAQ
It provides all the functionality of the C interface (except for the generalized mapped access of ncvarputg() and ncvargetg()) and is somewhat simpler to use than the C interface. With the C++ interface, no IDs are needed for netCDF components, there is no need to specify types when creating attributes, and less indirection is required for dealing with dimensions.

Will we ever get Java?

Answers to Some Frequent webtv.users Questions
According to posts in webtv.users from Steve Perlman, ex-president of WebTV, WebTV has been working to provide a form of Personal Java for the WebTV Plus terminal (and possibly the new Classics and Dishplayer, but nothing was said specifically about them as they were not announced products at the time of the posts)?there is no guarantee this will happen. For the full text of Steve's posts, click here.

Why does Java have interface? Is that because Java does not support multi-inheritance?

JavaChina, SCJP Questions & Answers by Roseanne Zhang (3...
interface in Java can play a role to do similar things like multi-inheritance. However, the concepts of "Programming again interface" is much deeper and more important. Actually, in C++ or any other OO languages, they all can also program against interface. The name called interface or not, the concepts are exactly the same. If you know what is PCI interface in your computer, that is a hardware interface. Your graphics card, your modern, ..., are all programmed against that interface.

What is a null interface in JAVA? What does it mean? Are there any null interfaces in JAVA?

Java Language FAQs
A null interface is an interface without any methods. Null interfaces are used to inform Java regarding what it can do with a class. For example, Serializable interface informs Java that objects of the implementing class can be serialized.

How to define arrays in Java, C/C++, and C#? Are they different?

JavaChina: SCJP Questions & Answers by Roseanne Zhang (8...
float[] only applies to the first variable of the right variable list. float[] f1d_a, f1, f1d_b[]; // is equivalent to float f1d_a[]; // or float[] f1d_a; float f1; // f1 is not an array float f1d_b[]; // or float[] f1d_b; In Java, better, but still confusing!! float[] applies to all variable of the right variable list.

Is there a C interface to the BLAS?

ScaLAPACK FAQ
Yes, a C interface to the BLAS was defined in the BLAS Technical Forum Standard. The source code is also available.

How does the Fortran interface differ from the C interface?

NetCDF FAQ
It provides all the functionality of the C interface. The Fortran interface uses Fortran conventions for array indices, subscript order, and strings. There is no difference in the on-disk format for data written from the different language interfaces. Data written by a C language program may be read from a Fortran program and vice-versa. The Fortran-90 interface is much smaller than the FORTRAN 77 interface as a result of using optional arguments and overloaded functions wherever possible.

What is the Java equivalent of C++ friend"?

Java Programmer's FAQ
The keyword "friend" in C++ is a hack to allow a piece of code to access the private member declarations of another class. In Java, you would do this by labelling, not the friend, but the private members. Instead of making them private, make them protected. Classes in the same package have automatic "friendship" in that they can access each other's protected fields. Yes, only it's better and simpler to use in Java. It's called the Java Generic Library.

Is it possible to invoke GCJ compiled Java code from a C++ application?

The GCJ FAQ - GNU Project - Free Software Foundation (FSF)
What license is used for libgcj? libgcj is distributed under the GPL, with the 'libgcc exception'. This means that linking with libgcj does not by itself cause your program to fall under the GPL. See LIBGCJ_LICENSE in the source tree for more details. How can I contribute to libgcj? You can send simple bug fixes in as patches. Please follow the GCC guidelines for submitting patches. For more complex changes, you must sign copyright over to the Free Software Foundation.
More Questions >>

© Copyright 2007-2012 QueryCAT
About • Webmasters • Contact