Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Sep 2008
    Posts
    48
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Program for C++ compilation

    All I want is a simple program that allows me to type c++ code, and runs the program

    *rages at microsoft visual c++*

    I've tried several different ones, none of which have worked. I run Windows Vista, so I need something that's compatible

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    What's wrong with Visual C++? It is pretty easy since there isn't anything you have to configure after you install it. If you don't want to use the IDE you can run the compiler from the command line.

    Otherwise if you could use GCC or MinGW if you don't want to use Microsoft's compiler.

    All three will work on Vista.
    OracleGuy

  • #3
    New Coder
    Join Date
    Sep 2008
    Posts
    48
    Thanks
    7
    Thanked 0 Times in 0 Posts
    http://i66.photobucket.com/albums/h2...03/error-1.jpg

    ^ is the problem. I'm completely new to c++, my experience is in javascript, and I'm trying to learn c++. How would you get visual c++ started so you can just write out the code and have it compile it properly? Clearly I'm doing something wrong, but the program has no clear instructions as to how to properly compile a program

  • #4
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Well that means there are some errors in your C++. There isn't a problem with the tool, it is your code.

    You can see what the errors are in the error list. Which if the window isn't open some place on the IDE already, go to View in the menu and click on Error List.

    If you don't understand the problems, post what the errors are and post your code.
    OracleGuy

  • #5
    New Coder
    Join Date
    Sep 2008
    Posts
    48
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Code:
    #include <iostream>
    using namespace std;
    
    cout << "test";
    I just did a simple program at first, I don't see anything wrong with it

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by blitz104 View Post
    Code:
    #include <iostream>
    using namespace std;
    
    cout << "test";
    I just did a simple program at first, I don't see anything wrong with it
    Your program has no entry point, all programs must have an entry point.

    Code:
    #include <iostream>
    using namespace std;
    
    int main()
    {
    
    cout << "test"; return 0;
    }
    The error messages hopefully would have said that was the problem.
    OracleGuy

  • Users who have thanked oracleguy for this post:

    blitz104 (07-28-2009)

  • #7
    New Coder
    Join Date
    Sep 2008
    Posts
    48
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Ah, thanks for that, I think the book I've been reading to learn C++ mentioned this at the beginning, but it never came up again, so by the time I got on and tried to write my own programs, I'd forgotten about it entirely. But I didn't get an error message, aside from the one I posted earlier


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •