[NTLUG:Discuss] parse error before `(' token

balaji krishnan baa_krish at yahoo.com
Fri Nov 7 08:52:24 CST 2003


Hi 
 I am hitting an error " parse error before `(' token"
when i try to compile my C++ code. The Code is
--
#include <iostream>
#include "DB.h"
using namespace std;

int main()
{
char * Ptr;
  Database * ptr = 0;
try {
  ptr = new Database(); --> Error in this line
  }
catch(...){
  cout << "Error " << endl;
  }
if (ptr ->LoginInformation("x","y","z") != 0)
{
 cout << "Error in Connecting to the Database " <<
endl;
 exit(1);
}

 cout << "Connected to the Database Successfully" <<
endl;
 exit(0);
}
--
 I am using gcc3 -g  -fPIC -c -I. for compiling

Please help me in solving this problem.

Thanks

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree



More information about the Discuss mailing list