Cpp. NET: "a-> Methodname" vs "a.MethodName"
I would like to know the difference between the two (sorry, I do not know the name of this topic).
I came from C # where I used to write System.data as well as classA.MethodA. I already found out that in Cpp with namespaces I need to use ::, with classmembers →. But what about the simple "."? I created a connection System :: data: odbc :: odbcConnection ^. Later I was able to use connection.Open. Why not connection-> open?
I'm sorry, I'm sure it’s easy to find something on the net, but I don’t know the English term for them. Thanks guys,
, ^ V++ * . "" , . . Google:
http://blogs.msdn.com/branbray/archive/2003/11/17/51016.aspx
, , , :
System::Data::Odbc::OdbcConnection connect;
//You should be able to do this:
connect.Open();
, :
System::Data::Odbc::OdbcConnection^ connect1 = gcnew System::Data::Odbc::OdbcConnection();
connect1.Open(); // should be an error
connect1->Open(); //correct