Results 1 to 8 of 8
  1. #1
    awsomeownage's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    33
    Reputation
    12
    Thanks
    0
    My Mood
    Inspired

    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?

  2. #2
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    You put C++ Code in the Wrong IDE...

  3. #3
    _Fk127_'s Avatar
    Join Date
    Nov 2010
    Gender
    male
    Posts
    724
    Reputation
    16
    Thanks
    208
    My Mood
    Bitchy
    download microsoft visual c++ and put this in there.

  4. #4
    swatfx's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Posts
    661
    Reputation
    20
    Thanks
    108
    My Mood
    Mellow
    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

  5. #5
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Don't blame Visual Basic for your own stupidity.

  6. #6
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    Don't blame Visual Basic for your own stupidity.
    Epic 5 day bump you dirty NOOB

  7. #7
    scimmyboy's Avatar
    Join Date
    Jan 2008
    Gender
    male
    Location
    http://mpgh.net MPGHCash: $442,596,199
    Posts
    5,649
    Reputation
    26
    Thanks
    894
    My Mood
    Happy
    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

  8. #8
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,607
    Reputation
    149
    Thanks
    4,922
    My Mood
    Cool
    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.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development