Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C++
why there is no variabel after &
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="hon123456, post: 3994786"] Dear all, I have following code: #include <stdio.h> // for printf #include <SQLAPI.h> // main SQLAPI++ header int main(int argc, char* argv[]) { SAConnection con; // create connection object try { // connect to database // in this example it is Oracle, // but can also be Sybase, Informix, DB2 // SQLServer, InterBase, SQLBase and ODBC con.Connect( "test", // database name "tester", // user name "tester", // password SA_Oracle_Client); printf("We are connected!\n"); // Disconnect is optional // autodisconnect will ocur in destructor if needed con.Disconnect(); printf("We are disconnected!\n"); } catch(SAException &x) { // SAConnection::Rollback() // can also throw an exception // (if a network error for example), // we will be ready try { // on error rollback changes con.Rollback(); } catch(SAException &) { } // print error message printf("%s\n", (const char*)x.ErrText()); } return 0; } What I don't understand is catch(SAException &) . Please notice that the & is withou a name after it. So what does this (SAException &) means? Thanks [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
why there is no variabel after &
Top