PDA

Click to See Complete Forum and Search --> : C++ VS Visual Basic?


outcast24817
Jun 16th, 2005, 08:28 PM
I have heard pretty much everyone who knows about programming say that c++ is better than VB, from what i can see, vb does the same stuff C++ does, but with more readability, also, c++ doesnt seem to have any easy way to create buttons and professional looking user interfaces the way VB does. Is there any great speed difference between the two? and what are some other pros/cons of each?

boku
Jun 16th, 2005, 09:11 PM
If I remember correctly once read a review on both of them with a comparisson by a microsoft employee. Overall he did say Visual Basic was better as it has a lot more functions along with the easability.

dee-u
Jun 16th, 2005, 09:24 PM
Take a look at this one (http://www.codeguru.com/forum/showthread.php?t=208672&highlight=vc+vb)...

Merri
Jun 16th, 2005, 09:28 PM
If you need to know about the speed... well, I just did these partly to prove VB can be fast:

http://www.vbforums.com/showthread.php?t=344694

Those do pure maths a whole lot. As overall, VB is more developer friendly, while C or C++ gives you more control easily. In the other hand, you need to do much more when you have more control, so developing a program with VB is much faster than it is with C. While when the program gets big, in C it is handled better: I often hear people saying it is easy to control a big project in C, while it becomes a nightmare with VB. In the other hand, that is the point of VB: to do fast and to do small or middle sized programs.

Joacim Andersson
Jun 16th, 2005, 09:30 PM
I started out as a C/C++ programmer, well that's not the whole truth since I as many others first came in contact with computers learning the BASIC language. I was about 10-11 years old back in the late '70s and wrote cool programs like:10 PRINT "Hello ";
20 GOTO 10 I later learned Pascal and then C and C++. But as a professional programmer I got my first job as a C++ programmer, the year was 1987 and I had just turned 19 (hmmm... I'm giving away my age here, one of those well preserved secrets). Anyhow, Windows where nowhere in sight yet so I wrote custom applications for DOS. When VB was first introduced in the early '90s I jumped on it faster then Pamela Anderson jumped Tommy Lee. But opposed to them my relationship with VB has been a long lucky one.

But of course I've had to listen to my fellow programmers who called it a "toy language". Well, in the beginning it pretty much was. But we've all heard "real" programmers say things like that forever. "You can't do this in VB", "VB is an interpreted language, you can't even make real binaries with it", "How silly it is that you need all those run-time files"... and so on forever and ever... The guys that complained the most was those that jumped on the Java train very early... and of course Java isn't interpretated or needs a huge run-time does it? (I have nothing against Java, I use it often). Also other fellow C++ programmers wrote Windows application using MFC which of course also requires huge run-times.

So much of their ados just didn't cut it. We have bin able to compile our VB programs to pure native code, creating the same kind of binaries as VC++ does, since version 5.

I admit that when it comes to speed, you can write C++ programs that runs much faster then a VB program. But in many cases that just doesn't matter. For a regular desktop application, like a word processor, speed is not the main concern since your program will have more then enough time to process any input made by the user (what kind of computer runs slower then even the fastest of typewriters can type?). Today many applications use the Net, in which case the speed issue is in the network connections and server response times rather then in the execution of code.

Let's compare another speed issue: The speed of development, to get what the customer wants delivered on time (nobody is going to pay you for two month extra work just so they will earn a few milliseconds in execution time). Well VB will be the winner here. There aren't many C++ RAD (rapid application development) tools but some do exist, like Borland C++ builder that comes with a Form package much like VB.

So which is better the apple or the pear? Well, it first come down to taste but mainly what it comes down to is the usage. What will it be used for? I still does development in C++ when I need to. But that is actually not very often.

CVMichael
Jun 16th, 2005, 10:35 PM
I totaly agree with Joacim Andersson...

In VB takes one quarter of the time it takes in C++ to make an application. I made an application in VB at work (for work),(the system that we use now) that is quite big ~35000 lines (server + client), (and by the way Merri, I can manage it with no problem). I made it in my free time at work between the things I was supposed to do, and it took me about a 6 months to do (I still do maintenace for it). If I were to do the same thing in C++, I am SURE I would be still working on it right now (it's been a year and 3 months since I started it).

I still use C++, but mostly when I need speed in VB...

The same way I used to use ASM in C++, now I use C++ for VB. I usually make a DLL (Or ActiveX DLL) in C++ for the things I need to do really fast, like sound processing or bitmap compression/filters, stuff that requires lot's of loops,also multithreading, etc., and use VB as the interface.

[edit]
Actually, this is a thread with a good example of when I use C++ in VB:
VB - Tone Recognition (http://www.vbforums.com/showthread.php?t=336074)
In the first post, it is VB only, and second post I made a DLL in C++ to speed up the processing (making it real-time)...

VIP3R
Jun 16th, 2005, 11:05 PM
Put it this way. The speed of execution difference between VB and C++ is enormous. C++ leaves VB in the dust. A simple mathematical loop will execute in a fraction of the time that it does in VB. To put it simply, advanced programing can only be done in C++. Something as simple as keyboard hooks cannot be done in VB, leaving you to make a DLL in C++ to accomplish the task. But don't get me wrong, getting a form to pop up in C++ is a rediculous task nontheless. If you're doing it from scratch, making a window appear in C++ will take you 15 minutes to program properly. You'll never have to deal with that in VB. Adding a form using code in VB is one line :P.

Joacim Andersson
Jun 16th, 2005, 11:21 PM
To put it simply, advanced programing can only be done in C++. Something as simple as keyboard hooks cannot be done in VBWhat do you consider to be advanced programming? I have no problem calling SetWindowsHookEx with WH_KEYBOARD_LL from VB to create a low level keyboard hook, or are you still using VB4?

outcast24817
Jun 17th, 2005, 12:08 AM
well, i wrote two programs, with vb 6 and c++ (microsoft visual studio 6)

time it takes for c++ to count to 1000000000: 8.125 seconds
time it takes for VB to count to 1000000000 : 19.203 seconds

kinda dissapointing.. but oh well.
here is the code, i tried to get everything exactly the same:

VB
Option Explicit
Private Declare Function GetTickCount Lib "kernel32" () As Long
Dim firstnumber As Double
Dim secondnumber As Double
Dim thirdnumber As Double

Private Sub Form_Load()
secondnumber = 0
firstnumber = GetTickCount()

While secondnumber <= 1000000000#
secondnumber = secondnumber + 1
Wend
thirdnumber = GetTickCount()
MsgBox "time taken to count to 1000000000: " & thirdnumber - firstnumber

End Sub

C++
#include "stdafx.h"
#include "iostream.h"
#include "windows.h"


// how long does it take the computer to increment a var 100000 times?
void main()
{
double firstnumber;
double secondnumber=0;
double thirdnumber;

firstnumber = GetTickCount();

while (secondnumber <= 1000000000)
{
secondnumber++;
}
thirdnumber = GetTickCount();
cout << "time taken: " << thirdnumber - firstnumber;
}

this was using my xp home anthlon 2800 (2. GHZ)(they cheated me of 800 Mhz! i am going to have to overclock) with 512 megs ram (though that doesnt really matter)

here are the exe's:
http://www.geocities.com/outcast20087923/prog.zip
they will be uploaded in a moment

so i take it that if i made a video game in VB, it would run like, 19 / 8 = 2.5 times faster using directx?

outcast24817
Jun 17th, 2005, 12:22 AM
ok, they are uploaded now.
(you have to run the C++ prog from the command prompt or batch file)

what i found disgusting was that i got an error for not capitalizing "GetTickCount" when making the C++ version of the program. I looked around and i couldnt find any option to turn case sensitivity off, (or make it like VB where it corrects all instances for you) does anyone know how to fiddle with this feature?

Merri
Jun 17th, 2005, 12:23 AM
Did you turn all advanced optimizations on? Also, place the code behind a command button and not Form_Load.

dee-u
Jun 17th, 2005, 12:25 AM
While secondnumber <= 1000000000#, what is that sharp sign doing there?

Joacim Andersson
Jun 17th, 2005, 12:28 AM
Well, if you in your game just going to count up to a billion it would be faster to write it in C++ :). To make a little bit more fair comparison you should however remove the floating point error check in VB, since C++ doesn't have one.

Merri
Jun 17th, 2005, 12:28 AM
Oh yes, you should also check VB doesn't need to do useless automatical data type conversion. It might do it now. I'd use Long datatype (was it, uh... Word or Integer in C?)


As you can see, to do fast code with VB6, you need experience and knowledge on how to do it... you can't just do it and claim "it is so slow!"

outcast24817
Jun 17th, 2005, 12:33 AM
Joacim Andersson: i didnt get any errors when i compiled them
dee-u: i dunno, it put the symbol there after i typed the number, i tried deleting it several times
Merri: i dont see where the advanced optimizations are

Merri
Jun 17th, 2005, 12:35 AM
File > Make Project > Options > Compile > Advanced optimizations


Also, you didn't get any errors because it doesn't go over... nothing causes an error. VB checks for it automatically, unless you turn it off in advanced optimizations.

Joacim Andersson
Jun 17th, 2005, 12:38 AM
Joacim Andersson: i didnt get any errors when i compiled themI didn't say that you had an error I just said that you should remove the error check. VB has built in overflow checks so you can't assign a number higher then allowed to a variable. C++ doesn't have this which could cause unexpected results. Having the check makes the code safer but slower. You can remove these error checks before you compile the program. Also a console based application will always run faster then a Windows based app. You should to be fare make the C++ app into a Win32 windowed app before you compare them.

outcast24817
Jun 17th, 2005, 12:39 AM
actually, its called long in both C++ and VB, i think word is an old term for it

Type Size Values
unsigned short int 2 bytes 0 to 65,535
short int 2 bytes -32,768 to 32,767
unsigned long int 4 bytes 0 to 4,294,967,295
long int 4 bytes -2,147,483,648 to 2,147,483,647
int (16 bit) 2 bytes -32,768 to 32,767
int (32 bit) 4 bytes -2,147,483,648 to 2,147,483,647
unsigned int (16 bit) 2 bytes 0 to 65,535
unsigned int (32 bit) 2 bytes 0 to 4,294,967,295
char 1 byte 256 character values
float 4 bytes 1.2e-38 to 3.4e38
double 8 bytes 2.2e-308 to 1.8e308


yes i could have used shorter vars. but i wanted to make this take a measurable amount of time, i figured 'why not?'

CVMichael
Jun 17th, 2005, 12:40 AM
The sharp simbol means that the number is a double, VB puts that automatically when the number is very large and WITHOUT decimal places (so you don't confuze it with long)

outcast24817
Jun 17th, 2005, 12:41 AM
Joacim Andersson: ok, will do, but how exactly would i make it into a win32 project?

Joacim Andersson
Jun 17th, 2005, 12:41 AM
However, even when you turn optimization on you can always create faster applications using C++, nobody has claimed differently. It's just that there are very few real world applications where these differences actually make any difference.

CVMichael
Jun 17th, 2005, 12:42 AM
actually, its called long in both C++ and VB, i think word is an old term for it
Actually, "word" is the NEW term for it...

Joacim Andersson
Jun 17th, 2005, 12:45 AM
The C++ standard doesn't set the boundaries for an int or a long. An int is at least 16-bit in size. Word is not a new term, a word is a 16bit integer. A double word (or DWORD) would be 32 bit. MS started to use these terms in VC++ simply to remove the confusion if an int is 16 or 32 bit long.

outcast24817
Jun 17th, 2005, 12:56 AM
lol, enabling the optomizations took off 1.8 seconds with the VB app

krtxmrtz
Jun 17th, 2005, 05:00 AM
I admit that when it comes to speed, you can write C++ programs that runs much faster then a VB program. But in many cases that just doesn't matter. For a regular desktop application, like a word processor, speed is not the main concern since your program will have more then enough time to process any input made by the user (what kind of computer runs slower then even the fastest of typewriters can type?).

One thing worth mentioning is the gain C can achieve in some tasks involving processing a huge amount of data, like image processing, parsing text... Do you remember our recent cross-posts here (http://www.vbforums.com/showthread.php?t=334017) when I badly needed help to write my own C dll's? That was definitely an example where you can incroporate some C to your VB project to really boost its the performance.

penagate
Jun 17th, 2005, 07:57 AM
The C++ standard doesn't set the boundaries for an int or a long. An int is at least 16-bit in size. Word is not a new term, a word is a 16bit integer. A double word (or DWORD) would be 32 bit. MS started to use these terms in VC++ simply to remove the confusion if an int is 16 or 32 bit long.
Well strictly speaking a "Word" is supposed to be as many bits as the processer, so on a 32-bit system a word is 32 bits long. A DWord therefore would be 64 bits. But in Windows a word is 16 bits and DWord 32 bits, for the same reason I suppose that an Integer in VB is 16 bits when it should really be 32 bits.

time it takes for c++ to count to 1000000000: 8.125 seconds
time it takes for VB to count to 1000000000 : 19.203 seconds
That's extremely slow. It took me about 1.8 seconds on average. Also, your test involves floating point numbers which is always going to slow down an app, C++ as well as VB. Here's the code I used (all the advanced optimisations were on):
Option Explicit
Option Base 0
Option Compare Binary

Private Declare Function GetTickCount Lib "kernel32" () As Long
'

Public Sub Main()
Dim lngStartTime As Long
Dim lngFinishTime As Long
Dim lngMax As Long
Dim lngCounter As Long

lngMax = 1000000000

lngStartTime = GetTickCount()

While (lngCounter < lngMax)
lngCounter = lngCounter + 1
Wend

lngFinishTime = GetTickCount()

MsgBox "Time: " & lngFinishTime - lngStartTime
End Sub


this was using my xp home anthlon 2800 (2. GHZ)(they cheated me of 800 Mhz! i am going to have to overclock)
The point of that system is not that 2800 = 2.8GHz but rather an Athlon 2800 is approximately the same speed as a 2.8 GHz Intel. I'm using a 2600 myself.

I tried making the same app in C++, it took approximately 2.5 seconds in debug mode (In the VB IDE I stopped it after a minute or so) but being a C++ n00b I couldn't get a message box to display the time taken, all it would say was "Time: " instead. I guess that's a point for the discussion, VB is a hell of a lot easier to learn than C++.

outcast24817
Jun 17th, 2005, 12:31 PM
what is the purpose of these two lines?
Option Base 0
Option Compare Binary

and could you post your c++ code?

Joacim Andersson
Jun 17th, 2005, 12:36 PM
Option Base 0 means that arrays lower bound is zero which is the default so that line doesn't really do anything. You could also set Option Base 1.

Option Compare Binary is also a default setting meaning that functions like InStr and StrComp are case sensitive, "a" differs from "A". You can also set it to Option Compare Text.

NoteMe
Jun 17th, 2005, 03:55 PM
...but being a C++ n00b I couldn't get a message box to display the time taken, all it would say was "Time: " instead.



MessageBox(0, "My time was ****", "Finished", 0);


:p :p :p :p :p

penagate
Jun 18th, 2005, 12:45 AM
I know that NoteMe :p I just don't know how to concatanate strings :blush:

#include <iostream>
#include <tchar.h>
#include "windows.h"

int _tmain(int argc, _TCHAR* argv[])
{

// Count to 1000000000

long lngStartTime = 0;
long lngTime = 0;
long lngMax = 0;
long lngCounter = 0;

lngMax = 1000000000;

lngStartTime = GetTickCount();

while (lngCounter < lngMax)
{
lngCounter++;
}

lngTime = (GetTickCount() - lngStartTime);

MessageBox(0, (LPCTSTR) "Time: " + (lngTime), "Speed Test", MB_OK);

return 0;
}


I know its wrong, it says "Time:" but nothing else.

Merri
Jun 18th, 2005, 02:45 AM
I'm not sure as I did C++ in 2002 the last time, but it was something like:


String = concat("Time: %s", lngTime);


I'm not sure if that is the command... concat was the first one to come in to mind for *cough* some reason *cough*.

Joacim Andersson
Jun 18th, 2005, 08:55 AM
It's strcat(s1, s2); s2 is added to s1. Just make sure s1 is large enough to contain s2 as well, C doesn't do it for you. This is a C function, but of course also exists in C++. However in C++ there is often a string class where the + sign have been overloaded so you can concat strings using the + sign. If the two strings are of this string class that is.

penagate
Jun 18th, 2005, 09:03 AM
How you convert a long to a string? I tried type casting it but of course then it has to think it is a pointer and throws an exception.

penagate
Jun 18th, 2005, 09:08 AM
what i found disgusting was that i got an error for not capitalizing "GetTickCount" when making the C++ version of the program. I looked around and i couldnt find any option to turn case sensitivity off, (or make it like VB where it corrects all instances for you) does anyone know how to fiddle with this feature?
C and C++ are case sensitive languages. long is not the same as LONG, etc.

Joacim Andersson
Jun 18th, 2005, 10:19 AM
How you convert a long to a string? I tried type casting it but of course then it has to think it is a pointer and throws an exception.Use the _ltoa() function, or _itoa() to convert an int to a string.char buff[20];
long lng = 3497612L;

_ltoa(lng, buff, 10); // 10 is the base, must be a value between 2 and 36You can also use _ltow() or _itow() for the Unicode versions of the functions.

penagate
Jun 18th, 2005, 10:39 AM
Righty-oh, thanks for that :)

I gave up trying to get it to work with strcat so here's what I got in the end
#include <iostream>
#include <tchar.h>
#include "windows.h"

int _tmain(int argc, _TCHAR* argv[])
{

// Count to 1000000000

long lngStartTime = 0;
long lngTime = 0;
long lngMax = 0;
long lngCounter = 0;

lngMax = 1000000000;

lngStartTime = GetTickCount();

while (lngCounter < lngMax)
{
lngCounter++;
}

lngTime = (GetTickCount() - lngStartTime);

char msg[5];
_ltoa(lngTime, msg, 10);

MessageBox(0, (LPCTSTR) msg, "Speed Test", MB_OK);

return 0;
}


In Debug configuration it clocked about 3.2 seconds and with full optimisations on it said 0 seconds everytime, even when I multiplied the maximum number by 10. This led me to think that the compiler had stripped out my loop as part of the optimisation process... So I played around with the optimisations... once it clocked 4.5s... and now I can't get any time at all no matter what I do :D :p

So I still think C++ is faster, its compiler is definitely smarter, because there aren't many situations when you want a program to count one-by-one :D

Joacim Andersson
Jun 18th, 2005, 10:45 AM
So I still think C++ is faster, its compiler is definitely smarter, because there aren't many situations when you want a program to count one-by-one Is there anyone who has ever claimed that C++ would be slower? How smart the compiler is has nothing to do with the language itself. There are many C++ compilers out there, some are better then others.

penagate
Jun 18th, 2005, 10:48 AM
Let me rephrase that.

"I still think C++ is definitely faster even though I couldn't actually get it to clock a time that was faster than I could achieve in Visual Basic."

"The MS VC++ compiler is definitely smarter than the MS VB6 compiler because it stripped out an unnecessary piece of code which the VB compiler left in even with full optimisations enabled."

Joacim Andersson
Jun 18th, 2005, 10:55 AM
BASIC compilers usually don't cut of loops since it's a old habit in the BASIC language to add loops to do a pause. Stripping it off would render old code useless.

szlamany
Jun 18th, 2005, 10:57 AM
These conversations can be so pointless - faster compiler? More efficient object code?

How about a good programmer vs a poor programmers - I bet that makes the biggest difference.

I come from 25+ years of mainframe programming. We've been converting all our mainframe apps to VB with MS SQL for the past four years.

We decided that all the business logic should be in T-SQL stored procedures - that's a "slow" language when compared to the likes of C++ or VB - I would imagine the crowd would say.

Recently we took our scheduling algorithm - dozens of pages of mainframe code - that puts students into high school classes. Some kids schedule in a couple of dozen iterations - some take 3000 or 4000 or more iterations. The mainframe code was all about loading memory pools with data - so that the iterations would be liquid fast.

For the past 4 years I had been suspicious that it would be required to be written in VB on the client - or C++ on the client - or C++ as an extended stored procedure on the SERVER.

Well we actually wrote it in T-SQL in a STORED PROCEDURE on the SERVER. About 6 pages of queries - some serious logic. But it takes less then 5 minutes to schedule a large high school (1500+ kids). That time beats the mainframe. Written in a 4-th generatation language like T-SQL. I was blown away.

Now we have an incredibly easy to support routine - basically a pile of queries in a package - that complete an incredibly complex task.

Moral of the story - use the best tool for you to quickly create, easily support, easily enhance - basically produce more efficiently.

Could this routine run faster in C++? Probably. Would it be worth it - from our business perspective - no.

penagate
Jun 18th, 2005, 11:09 AM
How about a good programmer vs a poor programmers - I bet that makes the biggest difference.
I think that sums it up.

A good programmer in any language (well OK most) will beat a poor programmer of a fast language like C++ or ASM.

But a good programmer in C++ will beat a good programmer in VB (if only by an unnoticable difference). I think that was the point of the thread originally (the speed difference part anyway).

Merri
Jun 18th, 2005, 03:29 PM
And a last addition: for the good VB programmer it takes less time to do the same what it takes for the C++ programmer. So, VB programmer likely beats the C++ in the time taken to make the code, but the end result by C++ coder is faster.

Had to say those things so they won't be totally forgotten :)

msdev
Jan 4th, 2012, 09:34 AM
I totally disagree tht VB is far much better than vb
Of course Vb made things simpler but it is simple language used by basic
i think that noone above who have comment has an idea of master functions of c++
in vb Msgbox code..etc are implemeted but in CPP 2 % of the program are reserved and else we create for eg in c++ Cout works when we as iostream.h file whic creates the code cout we can even edit that

Vb does not provide graphic accerlation while c++ does that why games are build in it

cPP is difficult but it will take less time to learn all functions of c++ than vb

c++ can build Os while vb not it wrks because net framewrk plugin else it has no power

VB not compatible with other os while CPP does

I think if anybody says that VB is better than CPP than I think that he is just a begginer developer making just DOS programs in CPP

Joacim Andersson
Jan 4th, 2012, 11:03 AM
First of all, this thread is over 6 years old. I don't understand why you had to wake it up after all this time.
I totally disagree tht VB is far much better than vbThat didn't make sense, but I guess that you disagree that VB is better than C++.

Of course Vb made things simpler but it is simple language used by basic
i think that noone above who have comment has an idea of master functions of c++Well, if you've actually read the whole thread then you would know that you're wrong in this assumption. Just read my first reply again (http://www.vbforums.com/showpost.php?p=2053017&postcount=5).
in vb Msgbox code..etc are implemeted but in CPP 2 % of the program are reserved and else we create for eg in c++ Cout works when we as iostream.h file whic creates the code cout we can even edit thatSo what? MsgBox is not a reserved word in VB. I agree that VB has many more reserved words compared to C++ but that by itself doesn't make it a better or worse language.
Vb does not provide graphic accerlation while c++ does that why games are build in itThat's not correct. Today graphic acceleration are built into both the hardware as well as as software in the OS or via other platforms such as DirectX. Many games that come out today, depending on the platform, use various frameworks for the graphics and you can easily build high-end games for the X-Box or Windows (PC) using XNA and VB today.

The rest of your arguments is just nonsens if you want to compare the benifits of the two languages. "You can build operating systems in C++". Alright so what? How many developers in the world are building new operating systems?

The fact that you can use C++ on other platforms besides Windows is also besides the point. You can still not take your C++ source that you've used to create a Windows application and compile that on a different OS. You use the OS specific API when you do development to create the best experience on that specific platform. So saying that a language is better just because you can use it on different platforms doesn't make it better per sa. There are Basic languages (do a Google search for REALBasic) that are multitargetet as well, and you have Java that also claimes to be a multitarget language so if you want to develop for more than one platform you can use one of those, but you always have to make trade-offs if you pick one of those "write once - run anyware" approaches.

I'm not saying that VB is better than C++, but I'm also not saying that C++ is better than VB. That kind of comparison is just ridiculous simply because it depends on what you're doing. Is a hammer better than an saw? Yes it is! But only if you want to get a nail into a piece of wood but not if you want to split the same piece of wood, because then the saw will do a much better job.

To do an honest comparison of the languages you need to consider what it is that you need to do and in which language you will be most productive. So to get back to your argument about operating systems, I agree that I wouldn't pick VB if I ever needed to create a new OS. But then again I've never been paid to create a new OS and I doubt very much anyone will ever hire me to do so. My customers, that ultimatly pay me, are usually not interested in the tools I use but how fast they will get a return on their investment and since I can honestly say that I'm far more productive in VB compared to C++, VB will be my choice of language. But I'm not using VB alone, I use a bunch of tools and different technologies to get the job done.
I think if anybody says that VB is better than CPP than I think that he is just a begginer developer making just DOS programs in CPPI think that anyone that claims that C++ is better for everything is not living in the real world, developing real solutions to real people. Or to put it in other words: Is not a real developer. There are many programmers out there and a few of them are also developers.

Jenner
Jan 4th, 2012, 11:10 AM
Vb does not provide graphic accerlation while c++ does that why games are build in it


VB's been able to do this natively for a while now via .NET 3.0's inclusion of WPF but you can do graphic acceleration in any language you can call libraries with. I use hardware accelerated routines all the time in VB. Heck, I can do DirectX in Fortran if I wanted to. That's not the reason large-studio game developers use C++. They use C++ because it compiles tightly to native machine code; thus reducing the amount of processing layers required to run. They do this, at the cost of a managed code environment, which while safer and easier to program for, is slower.


cPP is difficult but it will take less time to learn all functions of c++ than vb


Not quite true if all you're talking about are core functions. VB doesn't have a lot of core functions. Neither does C++. Both language rely on the inclusion of libraries to do anything complex. In C++, you have to include math.c just like you have to call System.Math in VB.


c++ can build Os while vb not it wrks because net framewrk plugin else it has no power


That's just environment. You can just as well argue that programming a computer using nothing but 1's and 0's is better because you can always use it... but for C++, you need an operating system and a compiler. It really has nothing to do with the language.


VB not compatible with other os while CPP does


A language is only as good as you have libraries and a compiler for it. You're not going to see too many C++ programs that use C++ Direct3D libraries run natively on Linux. Same with Frameworks. There's plans for a .NET Framework that runs on ARM Processors in the very near future and .NET works on XBOX360 as well. There are also Mac/Linux versions of the .NET Framework called Mono.

EDIT: Cripes... I should have seen this was a necrothread before I hit the "reply" button...

Atheist
Jan 4th, 2012, 11:12 AM
msdev, you are resurrecting a pretty old thread!

I totally disagree tht VB is far much better than vb
Of course Vb made things simpler but it is simple language used by basic
i think that noone above who have comment has an idea of master functions of c++

I agree that VB is not better than C++ but at the same time I do not agree that C++ is better than VB. It all boils down to the right tool for the right job and all that.
You mention master functions of C++...i have never heard anyone say that before, could you elaborate?


Vb does not provide graphic accerlation while c++ does that why games are build in it

You are talking about languages and graphics acceleration, which makes no sense. It is true that games are usually written in C++ but not because the language itself provides some sort of acceleration when it comes to graphics. The graphics API (Direct3D, OpenGL..) provides access to the graphics hardware. Neither Direct3D nor OpenGL is in any way tied to C++, and can be used with VB.


cPP is difficult but it will take less time to learn all functions of c++ than vb

Please elaborate on this. This makes no sense. C++ in itself is minimalistic, but I take it you are referring to the standard template library which is not by any means simple.
How easy something is is entirely subjective.
On the other hand, does one really need to learn all classes and methods of an entire framework? A good developer doesnt keep everything in his head, a good developer knows how to find what he is looking for.
[/QUOTE]


c++ can build Os while vb not it wrks because net framewrk plugin else it has no power

VB not compatible with other os while CPP does

C++ is not dependency free, it requires a runtime. Fortunately this runtime is available on most platforms. This is what makes it cross-platform. However you have the Mono project for running .NET applications on linux. Theoretically, it is possible to write an OS in the .NET framework and I believe there are projects dedicated to it. Google and you will find it.


I think if anybody says that VB is better than CPP than I think that he is just a begginer developer making just DOS programs in CPP
I think you are a bit harsh in this statement and based on what you have written in your post, I could question your knowledge in the area, but I wont, because I'm nice like that ;).

CVMichael
Jan 4th, 2012, 11:19 AM
LOL, poor msdev, I guess he touched one of our sensitive spots

just lock the thread, because I think disscussions like this will never end.

Hack
Jan 4th, 2012, 12:36 PM
I agree, and have closed the thread.

However, I would like to permit msdev to respond to the comments related to his post should he so desire.

@msdev: If you would like the opportunity to respond please send me a PM, and I will unlock this thread so that you may do so. :)