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!??!?!
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!??!?!
This is a classic language-vs-IDE mixup — something several replies already hinted at. and correctly pointed to the wrong compiler, and added useful context about VB and classes. Quick, reliable signals for identifying the language are file extensions and syntax tokens: #include, {} and ; or using/namespace usually mean a C-family file (.c, .cpp, .h, .cs); Imports, Option Explicit, End If and extensions like .vb or .frm/.bas/.cls point to Visual Basic.
Common troubleshooting checklist:
.vb, or the VB6 IDE for classic VB). Notes and cautions: classic VB supports class modules but does not offer class inheritance the way VB.NET or C# does. Automatic language converters exist but are unreliable for nontrivial projects — a managed wrapper or a manual port is safer. Given the attachment name (c++vbfail.jpg), this appears to have started as a joke, yet the practical fix for "won't compile" problems is almost always to match the source language to the correct project and compiler.
Jump to Post— javmedia 2You'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
Jump to Post— Member #268003It's Simple Visual Basic Compiler won't compile C++ code you need to change your code to VB or use Visual C
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
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 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.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.