Click here to Skip to main content
15,393,622 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder16-Jul-09 3:09
cofounderChris Maunder16-Jul-09 3:09 
PinnedHow to get an answer to your question PinPopular
Chris Maunder16-Jul-09 3:05
cofounderChris Maunder16-Jul-09 3:05 
Questionerror: cannot call member function ‘bool QRegExp::exactMatch(const QString&) const’ without object Pin
Member 1496877119-Jul-22 5:14
MemberMember 1496877119-Jul-22 5:14 
AnswerRe: error: cannot call member function ‘bool QRegExp::exactMatch(const QString&) const’ without object Pin
jsc4219-Jul-22 6:35
professionaljsc4219-Jul-22 6:35 
Question/std:c++20 broke a template class Pin
Member 1567106212-Jun-22 10:07
MemberMember 1567106212-Jun-22 10:07 
Hi -

I have a template array class based on a std::vector. All worked well w/ c++17, but there is one line I can't seem to port to the new standard. I'm trying to acquire an iterator to the underlying vector.

Any advice is greatly appreciated.

An abbreviated depiction:
C++
template <class Type> class CMy_Array 
{

    private:
		std::vector<Type> m_vItems;

	public:

		CMy_Array()
		{
		}
		virtual ~CMy_Array ()
		{
			m_vItems.clear();
		}
        void InsertAt(int index)
        {

       	//	THE LINE IN QUESTION - trying to acquire an iterator...
        // this worked w/ std:c++17   -

            std::vector<Type>::iterator p =  m_vItems.begin();

        // With c++20, 2 errors occur; 
        // C2760 - syntax error: unexpected token 'identifier', expected ';' , and 
        // C7510 - 'iterator': use of dependent type name must be prefixed with 'typename'

        // Using the documentation for C2760, I modified the line in question as so -

    		std::vector<Type>::iterator p =  static_cast <std::vector<Type>::iterator> m_vItems.begin();

        // This eliminated the C7510 error, but C2760 remains.


        }      
}

Questionhow to implement CButton as CListbox item Pin
rtischer82776-May-22 2:51
Memberrtischer82776-May-22 2:51 
AnswerRe: how to implement CButton as CListbox item Pin
CHill606-May-22 5:12
mveCHill606-May-22 5:12 
GeneralRe: how to implement CButton as CListbox item Pin
rtischer82779-May-22 1:56
Memberrtischer82779-May-22 1:56 
QuestionHow can I get access to CXXView variables from a Parent Class in MFC Pin
Member 1503370419-Jan-21 7:34
MemberMember 1503370419-Jan-21 7:34 
AnswerRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Victor Nijegorodov19-Jan-21 20:52
MemberVictor Nijegorodov19-Jan-21 20:52 
GeneralRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Member 1503370419-Jan-21 23:13
MemberMember 1503370419-Jan-21 23:13 
GeneralRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Victor Nijegorodov20-Jan-21 8:10
MemberVictor Nijegorodov20-Jan-21 8:10 
GeneralRe: How can I get access to CXXView variables from a Parent Class in MFC Pin
Member 1503370421-Jan-21 5:58
MemberMember 1503370421-Jan-21 5:58 
Questioncode of this question Pin
avadhnaresh kushwaha12-Aug-20 8:17
Memberavadhnaresh kushwaha12-Aug-20 8:17 
AnswerRe: code of this question Pin
Richard MacCutchan12-Aug-20 8:19
mveRichard MacCutchan12-Aug-20 8:19 
QuestionKeypad locks Pin
Member 79891227-Mar-20 13:23
MemberMember 79891227-Mar-20 13:23 
QuestionTo insert a node at the back of a XOR doubly linked list Pin
Tarun Jha17-Oct-19 9:38
MemberTarun Jha17-Oct-19 9:38 
AnswerRe: To insert a node at the back of a XOR doubly linked list Pin
ZurdoDev10-Jan-20 1:02
professionalZurdoDev10-Jan-20 1:02 
QuestionWhy non-template function does not compile where as template function compiles? Pin
PBMBJoshi2-May-19 23:23
MemberPBMBJoshi2-May-19 23:23 
AnswerRe: Why non-template function does not compile where as template function compiles? Pin
Richard MacCutchan2-May-19 23:29
mveRichard MacCutchan2-May-19 23:29 
AnswerRe: Why non-template function does not compile where as template function compiles? Pin
k505410-Oct-19 8:53
mvek505410-Oct-19 8:53 
QuestionAdvice on interdependent asynchronous functions and task queuing? Pin
arnold_w7-Feb-19 23:07
Memberarnold_w7-Feb-19 23:07 
AnswerRe: Advice on interdependent asynchronous functions and task queuing? Pin
arnold_w7-Feb-19 23:34
Memberarnold_w7-Feb-19 23:34 
QuestionRecommended way to deal with queues and pointers to buffers Pin
arnold_w3-Feb-19 9:09
Memberarnold_w3-Feb-19 9:09 
AnswerRe: Recommended way to deal with queues and pointers to buffers Pin
Richard MacCutchan3-Feb-19 22:19
mveRichard MacCutchan3-Feb-19 22:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.