...

View Full Version : Program for C++ compilation



blitz104
07-28-2009, 03:01 AM
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

oracleguy
07-28-2009, 03:37 AM
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.

blitz104
07-28-2009, 05:51 AM
http://i66.photobucket.com/albums/h250/blitz103/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

oracleguy
07-28-2009, 06:11 AM
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.

blitz104
07-28-2009, 05:58 PM
#include <iostream>
using namespace std;

cout << "test";


I just did a simple program at first, I don't see anything wrong with it

oracleguy
07-28-2009, 07:14 PM
#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.



#include <iostream>
using namespace std;

int main()
{

cout << "test";
return 0;

}


The error messages hopefully would have said that was the problem.

blitz104
07-28-2009, 09:27 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum