Question:
whats the difference between visual basic and C++ ??????
Honor
2006-10-26 14:17:20 UTC
which one is more useful to learn???
please add details, thank you.
Eight answers:
Rob
2006-10-26 20:56:50 UTC
Now, I don't usually comment on other posts, but DracIron, I couldn't disagree with you more.



Whoever told the previous two posters (or whatever wikipedia entry they read) that Visual Basic in its current form is event driven was wrong. It could not be more Object Oriented in structure. Perhaps an early version of VBA... definitely not in a .NET setting.



Visual Basic and C++ are languages first - separate from the fact that they are presented in Visual Studio with the .NET platform. I learned C++ on an old UNIX server, and the syntax spills over completely to C++.NET (visual Studio) the only difference is that the objects that are most visual (forms, textboxes and the like) are already defined for me!



To answer your question - Syntax is the primary difference these days, though C++ gives you more power on the truly GEEKY level.



Honestly, if you are just starting in learning programming, I STRONGLY recommend learning C++. The reason for this is the fact that VB is a simple language in structure. The deep down control that you have from C++ that allows you to work all the way into the socket and protocol level is fantastic, and almost completely absent in VB. Why would you learn how to doggie paddle if you could learn how to REALLY swim? Once you know how to swim, you can pick up new strokes pretty easily, right? The same goes for programming languages.



I learned Object Oriented programming in C++ first. Java, C# and Visual Basic QUICKLY followed once I understood what the structures were. I was able to program encryption and sockets and process controls in C++ within a year - advanced control over your machine. Once I understood that, working with embedded SQL and OpenGL Graphics was a snap, because I understood C++ language. A class, variable, procedure, argument... whatever, they are the same from language to language, the only difference is in the syntax.



As for the .NET platform... some people don't like it. I happen to love it for the following reason: yes, it ripped off the virtual machine idea from Java; yes, it's a rip off of earlier open source and everyone hates Microsoft, but here's the catch - 80 percent of the professional workforce is developing in .NET today - do you want to be quirky and "cool" in your support of Java and Open Source, or would you like a job (and be able to program in the other on your own time, enjoying the fact that you are making fat bank using an easy program?)? Just a thought.



In case you're wondering, I currently teach VB, C# and C++ in college courses - both visual and not (in C++ case). I always focus on the concepts of OOP and trust that the languages will fill themselves in - they always do.



Wish you the best - I say definitely start with C++.



Rob
Betsy
2016-05-22 03:01:12 UTC
"Visual Basic" usually refers to Visual Basic 6. This is an older version of Microsoft structured basic. It's pretty much obsolete these days. There are still existing program written in it that are still being maintained, but rarely are new project started with ti. VB.NET is an update to Visual Basic that targets Microsoft's .NET Framework. It has a lot of similarities to VB6 but also some differences. Unlike VB6, VB.NET is fully object oriented. VB.NET is used quite a bit today. C# is a language developed by Microsoft that targets the .NET Framework. It's syntax is similar to C, but it's actually closed to Java. C# is used internally at Microsoft for most of thier .NET Framework develop and also used quite a bit outside of Microsoft. Even though you can do pretty much the same things with C# and VB.NET, C# gets more respect since it doesn't have the "Basic" stigma attached to it.
Jason D
2006-10-26 15:28:15 UTC
In the .net world, no difference really. As to which is more useful, it depends what you're trying to do. C++ is still by far the better standard programming language. Visual Basic tend to be used more for business GUI applications.
Special Ed
2006-10-26 14:22:35 UTC
Here is a nice little summary. If you decide on the Visual Basic, I would suggest Visual Basic.Net or actually the whole .Net curriculem seems to be the way to go nowadays.



http://www.dnjonline.com/article.aspx?ID=mar05_vbvscsharp



Good luck!
arbeit
2006-10-26 17:33:46 UTC
Horizon, If you don't give draciron a best answer, I will come to your house and smack you upside the head. He did a very nice job with that, and deserves at least the 10 points you can give him.
Jothi R
2006-10-26 14:27:45 UTC
VB is simple, GUI and easy to learn. C++ is comparitively tough and involves coding,logic and not so easy to learn.
gandalf
2006-10-26 14:21:08 UTC
VB is event-driven and C++ is object-oriented. For beginners, its easier to learn VB, but C++ is more robust and powerful.
draciron
2006-10-26 15:28:39 UTC
The differences are huge, at least with real VB and VC++ both of which are actually obsolete. .net has replaced both. The syntax has changed dramatically and there is little backwards compatability with either.



VB - Event driven, probably the best Interface from a programmers standpoint ever designed up to VB6. With VB6 they destroyed the help system which was usefull and excellent replacing it with a clunker that I never bothered to install since it was worthless. VB6 also forced you to bind data to controls which caused major havoc when you wanted fine grain control over what was going on. A major step backwards causing VB6 software to lose functionality and reduced a programmers ability to trap errors. No good VB programmer up till VB6 used bound controls.



VB syntax is based on the Basic language. It's goal, one that was achieved was to let the programmer work on the logic and reduce syntax issues. Basic was origionally written as a teaching language. It's design was to be as intuitive as possible and this goal was achieved. When coding with modern Basic varients like Gambas, VB, PowerBasic you spend little time on syntax and almost all of your time on logic. Ramp up time for a proffessional coder was months not years. A coder with apptitude could be productive sometimes in as little as 3-6 months and there are literally thousands of apps out there doing essential things written in VB by complete programming novices.



Syntax is two fold in VB. The main logic in a well written VB app resides primarily in the modules with calls to modules residing in the forms that comprise the GUI. However there are many VB apps that are without a single form and have no user interface at all. I've written many myself. Most VB apps have a user interface that you design doing drag and drop and then customizing by simple GUI edits on the components on a form. Designing a GUI is trivial. Making it look purty if you have artisitic talent again trivial.



The syntax itself supports primitive objects with a very intuitive layout. Someproperty.object = x is an example. The dot structure with the objects makes using OOP simple and easy. VB does not support super classing or other fancy OOP methods however.



The executable outputed by VB however was horrible. It was huge, buggy and dependent on a host of dlls. Another issue was starting with VB6 they no longer included the version number in the run time dlls. So VB6 apps clobbered apps written in prior versions of VB. The only possible reason for doing this would be to force people to upgrade to VB6. The real effect was to drive people away from VB. Many comercial apps written in VB were ported to mostly Delphi in large part because of this change. Many programmers like myself dropped the VB language because of VB6 and the obvious move by the world to web based development.



C++ and VC++ are different animals. Do NOT confuse them. VC++ looks alot like C++ and supports many of the same features but has major differences. The biggest being that VC++ is not a truely compiled language. You have to have run time libs to run VC++. The vcrtlxxxx dlls are some of the run time libs necessary for VC++ to run. Again dll hell was often accomplished as you could and many people did modify this run time lib. The name had to be the same however. The worst I've ever seen was a machine with 65 copies of vcrtlxxx and 12 distinct copies of it. 7 of which after a week of experimentation proved to be essential to the apps installed on the machine.



Also do not confuse VC++ with .netc++ those are also different animals. .net vb and .net vc are very similer in syntax and really just different front ends on the same backend.



C++ in general supported OOP but you could write module level programming just as easily. C++ the non-Microsoft versions is a compiled language. Various different GUI generators sit atop vendor specific versions and third party GUI generators sit atop these same versions. The most commonly used C++ today is GNU C++. GNU however has no GUI or IDE and there are dozens of IDEs and GUI generators for it. Borland and Microsoft currently put out C++ like products but do not support true C++ at all any more.



In C++ you have complete control over you application. Everything including memory management is your responsibility. Most memory leaks are applications written in C++ where the programmer(s) forget to deallocate memory, have an error in thier program where memory is never deallocated or use code from others, usually in widgets and objects they themselves never see a line of the code that cause such memory errors. In .net c++ if I remember correctly it has adopted the Java memory handling model. That means no more pointers or such memory management. Buffer overflows are another problem common to apps written in C++ and C++ like languages. With C++ the handling of arrays and buffers is purely up to the programmer. If there is no logic in the program to deal with input that is larger than the space allocated for the data then that data is dutifully written over parts of the program itself. Thus it can be possibly executed by the application itself if the overwritten data is carefully crafted. This is not a problem with apps written in other languages except when the buffer overflow problem is built into objects that language uses and were written in C++ or a C++ like language.



Syntax wise .net is more related to Java than C++ from what I've heard. I imediately dismissed the whole .net thing the day it was released. .net has also been slow to be adopted. I think many companies are tired of porting from one Microsoft language to another to another. Think about it. First it was Quick C that Microsoft wanted everybody to use. Then they dumped Quick C without warning and told everybody to use QB and the proffesional version of it called PDS7. Many people did. Then they dropped support for that and told everybody to go to Foxpro. So tens of millions of lines of code were written in Foxpro Then along comes VB. Microsoft tells everybody to dump Foxpro and use VB. Foxpro languises almost completely without support from M$ until most people are forced to abandon it and go with VB. Billions of lines of code were written in VB. Then Microsoft dumps it and says .asp is the way. Now they've dumped .asp and .net is the way. Now all that VB code is worthless. This is expensive, a waste of time and has no benificial purpose. Worse you know they'll dump .net a few years from now and you'll have to do it all over again. Why pump the money into it?



So to answer you question. I'd recomend not learning either VC or VB. Both are no longer supported. .net is a waste since the only people who'll be supporting .net a few years from now will be the mono project. Learn Java instead. It'll be around long after .net ceases to exist. Java programmers get paid a whole more as well. Learn C++ and if you get good at it you can write device drivers and other low level apps. You will always have a job if you know real C++ and on the nix side of the world it's always handy to know some C++. Just don't use VC or .net c++ it's not the real thing.



PHP is a booming language. The majority of the web today is written in PHP. Flexible, easy to use, well supported, tons of classes and gadgets/widgets to use. Can be OOP or can be modular in nature. It will also be around long after the latest M$ fad. And the next M$ fad and the one after that. Learning Microsoft languages is a lesson in futility. They just go away from under you. Over the last 20 years I've become proficient in several Microsoft languages. Written millions of lines of code in VB, VC, MASM, Foxpro, QB/PDS7 and today it means nothing. All that experience is completely worthless. I finally had enough of the merry go round and jumped into web based development and switch to Linux. Now what I learn means something. That experience means something and isn't obsoleted in a short time just because there is a fad. When something I know is obsolted today it's because things improved, not changed just to change and force everybody to buy a whole new set of compilors. Microsoft's economic model depends on selling you the same thing over and over again. It also exists to make it just easier to quit writing your own code and use inferior but less expensive off the shelf software. To adapt your business model to fit somebody else's ideas. This is sad. It's done a great deal to kill the ability of programmers to make a living in the the US. So many shops that used to employ programmers gave up. They could not afford to hire somebody to completely rewrite thier code every few years. The associated bugs, projects gone bad have cost the economy billions. Each generation of the app producing less and less functionality and often less stability. Microsoft is not good for the IT industry in the US.and for years has been the worst thing to happen to it.


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