Question:
how 2 convert vb to c++?
Preeth
2006-11-26 09:03:50 UTC
how 2 convert vb to c++?
Five answers:
WickedSmaht
2006-11-26 10:03:56 UTC
Well, lots of companies i've worked for have asked me this question. There are no easy ways to convert VB6 into C++, and here's why:



VB6's syntax is somewhat different from C++, but it also comes with a large set of built-in functions that C++ does not have. C++ also has the ability to natively access OS functions that VB6 needs a bit of extra text to reach.



Both can create strong applications, and both use event-driven programming. however, there are VB6 programs that can be written without much knowledge of robust programming techniques, leading to come awful designs.



You probably don't want to simply automate the conversion of a VB6 program into C++ - you want to "re-engineer" it. This is complicated for a novice programmer. You should ask "why C++?" first of all.



perhaps choose VB.NET as a target. There are automated tools to convert VB6 into VB.NET. From there you can tinker with the code to remove some of the conversion residue (there will be some extra attached libraries for backward compatibility).
ROY L
2006-11-26 18:27:23 UTC
This is (was?) not difficult for numeric calculations where some of the syntax can be identical. I converted the Whetstone Benchmark from Fortran to BASIC, then to VB, Excel VB and C. These can be found at my website:



http://freespace.virgin.net/roy.longbottom

http://freespace.virgin.net/roy.longbottom/whets.c

http://freespace.virgin.net/roy.longbottom/whets.bas

http://freespace.virgin.net/roy.longbottom/whets.for

http://freespace.virgin.net/roy.longbottom/whetsvb.txt

http://freespace.virgin.net/roy.longbottom/whetsvb.xls



All the main calculations are the same.



I forgot Java



http://freespace.virgin.net/roy.longbottom/whetjava.zip
evolver
2006-11-26 18:51:21 UTC
Well there is a tool that can convert vb.net into C#.



http://www.aisto.com/roeder/dotnet/



Compile your program, and then reverse engineer with this tool, .NET Reflector.



Since # syntax is closer to C++ than vb's, at least it gets you part of the way there.



(I've heard that this Reflector add-on can decompile to C++, but I haven't tried it:



http://www.mybadhairday.com/cppclireflector.html )
liketoaskq
2006-11-26 19:10:21 UTC
Will be disastrous.
Ashwin M
2006-11-26 17:29:17 UTC
they are different compilers.Nothing can be done.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...