#include <iostream>using namespace std; int x; void main(){ cout<<"How old are you? "; cin>>x; cout<<endl; if (x<18) { cout<<"You're still young. You are not eligible to vote." } else { cout<<"You are eligible to vote."; }}
Standard input is empty
prog.cpp:6:11: error: '::main' must return 'int' void main() ^ prog.cpp: In function 'int main()': prog.cpp:15:2: error: expected ';' before '}' token } ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!