Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic vs. C++: A Quantum Leap 2

Status
Not open for further replies.

Rougy

Programmer
Joined
Oct 15, 2001
Messages
249
Location
US
I understand the fundamentals of object oriented programming with structured languages.

Currently I'm coding in VB6.

Having said that, is there a great difference between the two languages, VB and C++?

So great that to upgrade to C++ should be done with caution?

Or is the learning curve surmountable in a short period of time?

I'm making basic data entry and reporting aps with SQL.

Thanks,

Rougy

-----
The death of dogma is the birth of reason.
 
>> Having said that, is there a great difference between the two languages, VB and C++?

Major differences, I can't stress that enough.

>> So great that to upgrade to C++ should be done with caution?

"caution" is so ambiguous... i don't know what to say to that. Let me say that i would think one would find it tough to copy and paste code from the internet to build applications in C/C++. Having just re-read that statement let me change "tough" to "99.9% impossible" ;-)

>> Or is the learning curve surmountable in a short period of time?

I guess you need to define “short period of time”. As a point of reference, I would consider the book titled “Learn C++ programming in 21 days” a complete joke. Umm… I mean the title is a joke, not the book, I don’t know anything about the book, it may very well be a great beginners book.

Of course all of that is somewhat effected by your application requirements and criteria as well. To write small utility type desktop applications is much simpler than things like server software using tcp/ip and multi-threading and synchronization etc.


-pete
 
Well...that's what I wanted to hear.

I am writing fairly small database data entry and report programs.

In VB6, you "draw" the controls on the form. I was wondering if C++ had progressed to that "object" stage.

Mainly, everytime MS updates its Office package, my programs run the risk of blowing up or malfunctioning to some degree, and I wanted to get around that dependency.

I think I'll download the free compiler and dink around with that for a while.

You've been very helpful. Thanks.

-----
The death of dogma is the birth of reason.
 
>> In VB6, you "draw" the controls on the form. I was
>> wondering if C++ had progressed to that "object" stage.

Well Drag and Drop development is a feature of the IDE your working with not the language. That feature is also generally accompanied with a library of C++ classes commonly referred to as a "frame work". So you need to use the top of the line IDE's to get good DnD support and in C++ Windows applications that is Microsoft Visual C++

Something like gcc is a compiler only so you have absolutely no IDE nor DnD type of development.


-pete
 
I was afraid of that. Again, thank you.

-----
The death of dogma is the birth of reason.
 
Rougy,

if you're looking to upgrade your skills, take a look at .NET. Pete's exactly right about VC++... but .NET has a new (better, IMHO) version of VB, and it has C#... which I haven't used a whole lot of yet, but I like what I've seen so far.

It's quite an investment... but as a programmer who's spent the last 6 months learning it, it's worth it.

Just my $.02.

Ben
 
Ben makes very good points. Developing in .NET using a garbage collection environement would be much simpler than learning C/C++.

Keep in mind however that things like DnD development are still provided by the IDE (Visual Studio) not the .NET Libraries. Using Notepad and the .NET SDK for development is not going to be a walk in the park.

-pete
 
Agreed... to make programming as easy as your VB6 has been (and in a lot of cases, easier), you're gonna need to fork out some cash and get your hands on the IDE.

Ben
 
So you think it's doable, that the learning curve is within reason, going with the .NET IDE?

I appreciate your comments.

-----
The death of dogma is the birth of reason.
 
I think it all depends on why you want to switch from VB to another language.

If it's just performance gain you're seeking, I doubt that switching to VB.net will do you any good. Switching to C++ will do you good for that reason though.

If it's moving into real OO development, .Net will do you as good as C++. You say you've already got understanding of the fundamentals of the OO way of doing things (well then you must have figured out by now that VB 6 lacks most of the things that make a language OO), so moving towards VB.Net will be quite easy (C++ might be a lot more difficult, since the syntax differs quite a lot from VB).

If it's about expanding your knowledge in the program world, I would suggest you do both, since .Net seems to move in rather quickly and C++ is like Rock 'n' Roll; it will never die.....

Greetings,
Rick
 
Rougy, as for your question about "is it doable"... In November I stopped building VB6 Apps (at work) and moved to .NET. I actually started learning it with the biggest program I've EVER written in any language. I just released the final product in May. I have had no formal education that used any .NET product. I am the only programmer in our office; we're a manufacturing environment. I had one book on ADO.NET (the new data access technology) and my online resources (such as Tek-tips). I started this project as an intern; I am now full-time. Learning .NET is COMPLETELY doable, and if you have a good understanding of programming principles, you could learn it on your own...

If you invest in Visual Studio.NET (~$1000 US, last I checked), you'll actually get a version of C++ with it, complete with the IDE. As lazyme stated, if you're looking for a performance enhancement, .NET apps actually run a little slower than their counterparts in C++... but if you're just wanting to make your program more robust (which is what I got from your 2nd post in this thread), then you could feasibly use either product. I haven't tried C++.NET yet... I don't know how it communicates with the framework, or even IF it does... but it reminds me a lot of VC++ 6. I built a quick project just now to see what it would look like, and from that build, I'm under the impression that for the beginning-level C++ programmer, .NET is the same as 6.

Ben
 
>> I don't know how it communicates with the framework, or
>> even IF it does... but it reminds me a lot of VC++ 6.

Yes you can use the .NET libraries in VC7. It's called a "Managed" Project and is in the App Wizard list of items.

There are differences outside of the "Managed" projects, between 6 and 7 as well in areas like C++ standards support and ATL etc. The differences are documented at msdn.microsoft.com. The MFC framework is probably one of the least changed areas in VC++ as it is very mature and the need for extension is minimal.

-pete
 
Lazyme:
Obviously I don't know as much as you about C++, but if OO is Object Oriented, then VB6 is OO from top to bottom, at least the definition of Object as given to me by Dr. Zinna at CU. A textbox is an object. A form is an object. The interface with an Excel spreadsheet is an object. What is the definition of OO in the C++ world?

Benlink:
That's what I wanted to hear.

The problem I'm having with VB6 is it's entanglement with all things Microsoft, and when MS feels like changing something, the ripple effect on my existing programs is quite undesirable (the calendar codes set me off - MS "breaks" it with every new version of Office), and I wanted to learn C++ to build a more bullet-proof app.

Like you, Ben, I sort of got into this through the back door, just a few courses in college, and I've been teaching myself ever since.

-----
The death of dogma is the birth of reason.
 
>> then VB6 is OO from top to bottom

ummm... no it's not, period. If someone actually told you that, they were wrong, period.

ummm... The Calendar is a COM Object and if they change it then they do. The effect would be the same regardless of what language you are using to work with the COM Object.

Leaving VB6 for some other language is not going to detangle you from whatever changes MS makes in systems that you are using.

Don't get me wrong, i'm not encouraging anyone to use VB, I won’t go near it.


-pete
 
learn Java first. then you will know the right way to do C++
;)
 
Rougy;

>>A textbox is an object. A form is an object.

Agree, but those are not the kind of objects OO refers to; As palbano stated: they're COM objects...


>>The interface with an Excel spreadsheet is an object..

This is not true:
The Excel spreadsheet itself is an object (again; a COM object, not the kind OO refers to). The interface you're talking about is not an object, however. This is only a reference to part of (or maybe even al) the publicly exposed methods, properties etc. of the spreadsheet object itself.


Now the VB classes; they come a bit closer to what OO stands for. And that's just where VB lacks the abilities to be a true OO language; it doesn't allow inheritance.




Greetings,
Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top