What would you have to do in order to use different languages together. Say for some reason I was writing an application and I wanted to use Visual Basic for the graphical part of the program and use C++ as the engine. How would you go about doing this.
Some languages can be compiled into C-compatible object files and others cannot. C and C++ (and virtually any other C-compatible binary object file) can be easily linked together using the extern keyword.
If you would like to communicate between languages that cannot be linked together into a single executable, two options come to [my] mind: pipes and sockets. Distributed applications commonly communicate via sockets; the language that each task (server or client, in a two-tier archetecture) do not need to be the same.
ok. Thanks for the info. What I want to do is use Visual Basic to make my forms and such and use c++ to do the work. Ive also looked into qt a little too. What would you suggest
I'd write everything in C++ and Qt, but if you're doing it for the learning experience, then the best way is to code the back-end in C++ (or whatever) and have the front-end load the back-end and call functions in it, rather than the other way around. It's usually easier to load C/++ modules into other languages than to load modules written in other languages from C/++. This is because C is basically the lingua franca of programming.