Will this work? VERY VERY SIMPLE CODE :/

I Keep trying to compile this with Dev C++ (with mingw installed) and it won't compile :( and when I try to boot from Command Prompt it opens Dev C++ or just does nothing :(

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std ;

int main ()
{
//PGH
const double PI = 3.1515926536
or cout << "6/" circle circumfrence: " << (PI * 6) << endl ;
enum
{ RED = 1, YELLOW, GREEN, BROWN, BLUE, PINK, BLACK } ;
typedef enum { NEGATIVE , POSITIVE } charge ;
charge neutral = NEGATIVE , live = POSITIVE ;
return 0 ;
system ("PAUSE")
}

cout << "Neutral wire: " << neutral << endl ;
cout << "Live wire: " << live << endl ;
cout << "I shot a red worth: " << RED << endl ;
cout << "Then a blue worth" << BLUE << endl ;
cout << "Total scored" << ( RED + BLUE ) << endl ; 
Last edited on
That's because this code is not valid. All those cout are outside of any function. None of the stuff in main makes any real sense...

first find the error here
1
2
const double PI = 3.1515926536
or cout << "6/" circle circumfrence: " << (PI * 6) << endl ; 
you dont even need to do that. you need to go look at a c++ tutorial and learn some basics to be honest. There is nothing correct in what you've written.
As Mats said
None of the stuff in main makes any real sense...
Topic archived. No new replies allowed.