Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-28-2009, 02:01 AM   PM User | #1
blitz104
New Coder

 
Join Date: Sep 2008
Posts: 48
Thanks: 7
Thanked 0 Times in 0 Posts
blitz104 is an unknown quantity at this point
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
blitz104 is offline   Reply With Quote
Old 07-28-2009, 02:37 AM   PM User | #2
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
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
oracleguy is offline   Reply With Quote
Old 07-28-2009, 04:51 AM   PM User | #3
blitz104
New Coder

 
Join Date: Sep 2008
Posts: 48
Thanks: 7
Thanked 0 Times in 0 Posts
blitz104 is an unknown quantity at this point
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
blitz104 is offline   Reply With Quote
Old 07-28-2009, 05:11 AM   PM User | #4
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
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
oracleguy is offline   Reply With Quote
Old 07-28-2009, 04:58 PM   PM User | #5
blitz104
New Coder

 
Join Date: Sep 2008
Posts: 48
Thanks: 7
Thanked 0 Times in 0 Posts
blitz104 is an unknown quantity at this point
Code:
#include <iostream>
using namespace std;

cout << "test";
I just did a simple program at first, I don't see anything wrong with it
blitz104 is offline   Reply With Quote
Old 07-28-2009, 06:14 PM   PM User | #6
oracleguy
Rockstar Coder


 
Join Date: Jun 2002
Location: USA
Posts: 9,043
Thanks: 1
Thanked 322 Times in 318 Posts
oracleguy is a jewel in the roughoracleguy is a jewel in the roughoracleguy is a jewel in the rough
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
oracleguy is offline   Reply With Quote
Users who have thanked oracleguy for this post:
blitz104 (07-28-2009)
Old 07-28-2009, 08:27 PM   PM User | #7
blitz104
New Coder

 
Join Date: Sep 2008
Posts: 48
Thanks: 7
Thanked 0 Times in 0 Posts
blitz104 is an unknown quantity at this point
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
blitz104 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:19 AM.


Advertisement
Log in to turn off these ads.