I've tried everything, and I just can't get my program to compile in visual basic. Someone tell me what I'm doing wrong?

see attached image, are the includes in the wrong spot or WAT!??!?!

You're kidding right?

Thats not VB classic source code to begin with.

Thats .net or C # and it sure will not compile in VB 5 or 6

hehe sorry I thought I was in gcc. My bad

Member Avatar for abbajee

It's Simple Visual Basic Compiler won't compile C++ code you need to change your code to VB or use Visual C

What the hell?
Is this a joke or something?

Thats VISUAL BASIC.
The code is C++!

ok but wait, wat's the diff? o i no, it's that vb can't use classes rite? not OOP? ic

ps. look at the filename of the attachment, of course it's a joke :)

Ah right i didnt get it because when i downloaded it in IE it gets called

"c%2B%2Bvbfail.jpg"

which confused me

ok but wait, wat's the diff? o i no, it's that vb can't use classes rite? not OOP? ic

ps. look at the filename of the attachment, of course it's a joke :)

Man oh man where do I start?

First off, its the syntax that is different between C++ and VB. For example in C it is the parens() that define or contain an if or class where as in VB its a whole differt declaration...

Private MySub()
If ThisIsTrue = True Then
End If
End Sub

Public MyFunction(Arguement1 As String, Arguement2 As Integer) As Byte()
End Function

Now, VB can use classes especially since to add a class it is as simple as a couple of mouse clicks but "Classic VB" or versions 4/5/6 do not support true inheritance and VB is or can be OOP if you know what you are doing and you know what OOP is.

As for your joke, your file has been renamed to http://www.daniweb.com/forums/attachment.php?attachmentid=9400&d=1236124107 so some if not all of us probably don't get it.

oh, when I look at it, it says "c++vbfail.jpg".

and yeah, I know, I'm pretty fluent in VB but new in C++, I just wanted to see how people responded. Pretty awesomely, if you ask me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.