missing function header (old-style formal list?)

how do I solve this error?

// q 2.0.h

#include<iostream>
#include<cmath>

using namespace std;

namespace q20 {

public ref class Class1
{
// TODO: Add your methods for this class here.
};
}
int main ();
{

cout <<"Pledge: On my honor, I have neither given nor received unauthorized aid\n";
cout <<"on this assignment. I have not designed this program\n";
cout <<"in such a way as to interfere with the normal\n";
cout <<"operation of the D.C.C./ instructor's computer\n";

cout <<"Student name: Todd Hobza II";
cout <<"File name: q";
cout <<"Description: this program finds the 2 roots to a quadradic equadion";
cout <<"Course: egr 126 01";
cout <<"Date: 9/20/2013";


float a, b, c, r.1, r.2;


cout << "Press return after each number.\n";
cout << "what is the value of a?\n";
cin >> a;
cout << "what is the value of b?\n";
cin >> b;
cout << "what is the value of c?\n";
cin >> c;

r.1=(-b+sqrt((b*b)-(4*(a)*(c))))/(2*a);
cout << "r.1(root1) is:\n";
cout << r.1;

r.2=(-b-sqrt((b*b)-(4*(a)*(c))))/(2*a);
cout<< "r.2(root2) is:\n";
cout<< r.2;

system ("pause");

return 0;
}



build started: Project: q 2.0, Configuration: Debug Win32 ------
1> q 2.0.cpp
1>c:\users\toddh_000\documents\visual studio 2010\projects\q 2.0\q 2.0\q 2.0.h(16): error C2447: '{' : missing function header (old-style formal list?)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Please use [code][/code] tags. You have a semicolon after main: int main () //; <-- remove this
when I remove the ; after main it gives my lick 20 errors

and what is the function header?
1
2
3
4
5
6
void funky(); //function prototype

void funky(){} //function definition

void funky(); //function prototype
{} //A code block without a "function header", e.g. "void funky()" 


So, by putting that semi-colon after main(), you turn main() into a prototype and orphan that function body.

It would be easier for us to help you spot your errors if you used code tags as Danny Toldeo mentioned.

Random Notes:
I see you wrote public ref class Class1. In C++, you need only class Class1.
Your float variable names look suspicious.
Maybe these two links can help?

http://www.cplusplus.com/doc/tutorial/functions2/#declaring
http://www.cplusplus.com/doc/tutorial/variables/

r.1 and r.2 are not valid identifiers.
I finally solved the problem I had a ; on main and needed 2 at the bottom
Topic archived. No new replies allowed.