array of strings
-
Could anyone tell me what I'm doing wrong here:
// variables defined private: array^ m_sAddressList = gcnew array{"localhost"}; private: int m_nCurrentAddress; ... // attempting to make a property out of them public: property array^ m_psAddressList{ String^ get(){ return array(m_nCurrentAddress);} }
I'm getting the following compiler error: error C3901: 'get': must have return type 'cli::array ^' c:\documents and settings\john\my documents\programming\visual studio 2005\projects\winbot\winbot\ConnectionOperations.h 53 Any information would be greatly appreciated. Thanks, John -
Could anyone tell me what I'm doing wrong here:
// variables defined private: array^ m_sAddressList = gcnew array{"localhost"}; private: int m_nCurrentAddress; ... // attempting to make a property out of them public: property array^ m_psAddressList{ String^ get(){ return array(m_nCurrentAddress);} }
I'm getting the following compiler error: error C3901: 'get': must have return type 'cli::array ^' c:\documents and settings\john\my documents\programming\visual studio 2005\projects\winbot\winbot\ConnectionOperations.h 53 Any information would be greatly appreciated. Thanks, JohnThe 'get' must return an array to be consistent with how you've defined the property - e.g., return m_sAddressList. It's not clear what you are attempting to return. David Anton www.tangiblesoftwaresolutions.com Instant C#: VB to C# converter Instant VB: C# to VB converter Instant C++: C# to C++ converter and VB to C++ converter Instant J#: VB to J# converter Clear VB: Cleans up VB.NET code Clear C#: Cleans up C# code
-
Could anyone tell me what I'm doing wrong here:
// variables defined private: array^ m_sAddressList = gcnew array{"localhost"}; private: int m_nCurrentAddress; ... // attempting to make a property out of them public: property array^ m_psAddressList{ String^ get(){ return array(m_nCurrentAddress);} }
I'm getting the following compiler error: error C3901: 'get': must have return type 'cli::array ^' c:\documents and settings\john\my documents\programming\visual studio 2005\projects\winbot\winbot\ConnectionOperations.h 53 Any information would be greatly appreciated. Thanks, JohnForgive my ingnorance but what is with the '^' chaacter? The way you are using it is a syntax error in C++. INTP “Testing can show the presence of errors, but not their absence.” Edsger Dijkstra
-
Forgive my ingnorance but what is with the '^' chaacter? The way you are using it is a syntax error in C++. INTP “Testing can show the presence of errors, but not their absence.” Edsger Dijkstra
John R. Shaw wrote:
Forgive my ingnorance but what is with the '^' chaacter? The way you are using it is a syntax error in C++.
Hi, It would be a syntax error in standard c++ but isn't this the (Managed) C++/CLI discussion board? Therefore i would like to point out: "The carat operator (^) (often called a "hat" by C++/CLI folks) indicates that a variable or parameter refers to a reference-type object." Or did i misread your point? regards Tobias :cool:
-
John R. Shaw wrote:
Forgive my ingnorance but what is with the '^' chaacter? The way you are using it is a syntax error in C++.
Hi, It would be a syntax error in standard c++ but isn't this the (Managed) C++/CLI discussion board? Therefore i would like to point out: "The carat operator (^) (often called a "hat" by C++/CLI folks) indicates that a variable or parameter refers to a reference-type object." Or did i misread your point? regards Tobias :cool:
2beeOr did i misread your point?
Nope! You told me exactly what I wanted to know. I had a feeling it was something like that, as if C++ did not have enough operators already. INTP “Testing can show the presence of errors, but not their absence.” Edsger Dijkstra