Click to See Complete Forum and Search --> : Visual C++ vs VB


Jdawg
June 17th, 2009, 02:04 AM
All my work so far has been with visual basic and most of my programs make use of the web browser(I haven't coded in quite a while so this may be unclear, but the web browser you're able to insert into your program and manipulate with code.) Which language would be better to use if my primary focus will be programs containing web browsers and does anyone have any sample code utilizing a web browser in visual C++? Thanks.

Arjay
June 18th, 2009, 09:23 PM
Why do you want to use C++ to begin with? In other words, are there other aspects of the program that you would like to code in C++?

Jdawg
June 21st, 2009, 03:52 AM
It is my understanding that C++ is more flexible and stable. For instance, I have a program that starts at 20mb memory usage and ends up crashing after it reaches 1000+ mb within a few hours of runtime. Although that's most likely due to my poor coding, perhaps the same program in C++ would work better. However, I have downloaded Visual C++ express edition and have been trying to familiarize myself with it.

Arjay
June 21st, 2009, 09:36 AM
It is most certainly due to your coding. It is likely that you are using non-managed resources and are holding on to references. It could also be that you are calling a 3rd party assembly that is leaking. Visual Studio has a built-in profiler that can help you isolate the problem.

C++ may offer some advantages but has disadvantages in some areas as well: like web service creation/interaction or coding UI's.

Well, when I speak of the languages, I'm speaking of the frameworks typically used to code in these languages. C# or C++ on their own can't really code web services or UI's by themselves, they need to interact with the OS and rely on other frameworks to do so. I'm speaking of the overall coding experience that one gets by using a C# or C++ framework.

Along these lines, C# is a bit more homogenenous when coding and there are less 'discrete' areas to learn. For a someone complex application, it is often necessary to learn several technology areas such as COM, printing, file system and graphics when coding in C++. Often the system interaction is on a procedural level rather than OO. In C#, it is OO and there are less 'technology islands' to learn.