示例#1
0
int main(int argc, char *argv[])
{

	//std::back_insert_iterator<std::vector<double> > a;
	//std::back_insert_iterator<double> a;
	std::vector<double> MyVector;
	std::back_insert_iterator<std::vector<double> > MyIterator(MyVector);
	return 0;
}
示例#2
0
typename QueapTree<T>::MyIterator QueapTree<T>::begin()
{
	TreeNode<T>* pointer = root_;
	while(pointer->count_!=-1)
	{
		pointer = pointer->child_[0];
	}

	return MyIterator(pointer->parent_,height_);
}
示例#3
0
typename QueapTree<T>::MyIterator QueapTree<T>::end()
{
	return MyIterator(nullptr,1);
}
示例#4
0
文件: main.cpp 项目: CCJY/coliru
#include <iostream>

class MyClass
{
public:
    class MyIterator
    {
    public:
        const MyIterator& operator++(int) const;

    private:
        static const MyIterator END;
    };

};

using MyIterator = MyClass::MyIterator; //**QUESTION: I've already used the class, why did the nested MyIterator class not get recognized?**

// the following line is the definition of the static const object
const MyIterator MyIterator::END = MyIterator(); //error: ‘MyIterator’ does not name a type

const MyIterator& MyIterator::operator++(int) const
{
    return MyIterator::END;
}

int main() {

}