Visual Basic 2010 being stupid

Posts 1–8 of 8 · Page 1 of 1
Visual Basic 2010 being stupid
alright so i put this code into microsoft vb and im not sure if this is a user error or microsoft being stupid:
#include <stdio.h>
#include <iostream>

using namespace std;

int main()
{
int i;
for (i=0, i<10; i+1;
{
cout << "Hello World!";
}
system ("pause");
}
when i run it it does nothing but sit there and blink when i run it. Help please?
You put C++ Code in the Wrong IDE...
download microsoft visual c++ and put this in there.
Even though the above 2 said it I'm going to say it a tad more clearly.

The code you are trying to compile isn't Visual Basic it is C++.
So you need to use a C++ compiler instead of a Visual Basic one.
I would recommend Microsoft Visual Studio, or CodeBlocks.
I personally use Visual Studio
Don't blame Visual Basic for your own stupidity.
Quote Originally Posted by NOOB View Post
Don't blame Visual Basic for your own stupidity.
Epic 5 day bump you dirty NOOB
let me fix your code a bit.

Code:
#include <iostream> 
using namespace std;

int main()
{
     for (int i = 0, i < 10, i++)
     {
           cout << "Hello World!";
     }
system ("pause");

return 0;
}
you can declare variables inside the argument of the for loop. you also need to include input output stream to be able to use cursor out.

and u have to return something in your function
Clearly some of you are asses...

The Visual Basic could be a misunderstanding.

"Don't blame Visual Basic for your own stupidity."
This is C++ not visual basic, and the IDE is called Visual Studio.

"You put C++ Code in the Wrong IDE"
Hmm I might be wrong here, But if he said it runs dont that mean that it is compiling?

"download microsoft visual c++ and put this in there."
He said he put it in VS 2010 already.
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Tags for this Thread

None

Talk with us