CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: cantoma

Search: Search took 0.03 seconds.

  1. Re: Need help writing my own Iterator

    JohnW@Wessex this really solves the problem.
    Since the container that I am using inside my container already implements iterator.
  2. Re: Need help writing my own Iterator

    How does it looks an "iterator to const" just to understand the point?
  3. Re: Need help writing my own Iterator

    Now I have a problem regarding the implementation of the operator (!=)



    void choose_sentry( const Set& maximal_clique_i){

    Set::Iter maximal_clique_iter = maximal_clique_i.begin();
    ...
  4. Re: Need help writing my own Iterator

    It would make sense to do the same for the end() function



    const Iter end() const {
    return Iter();
    }


    Right?!
  5. Re: Need help writing my own Iterator

    This is an option for an Iterator implementation but it



    class Set
    {
    list <int> s; // Set of elements
    list <int> newlist(); // private function

    public:
  6. [RESOLVED] Need help writing my own Iterator

    Hi there I am trying to write an Iterator for a specific class.
    I have a class called Set that uses a list as a container.
    Could someone give some help or any idea of how an Iterator could be...
  7. Re: [RESOLVED] Return a Pointer of a local Array

    Since that was a serialization function I will delete the uint8_t allocated space during the unserialize function.

    Just to give an idea something like this:


    Graph Graph::unserialize (uint8_t*...
  8. Re: Return a Pointer of a local Array

    I see that a cast would allow me to print it.
    Thanks for the help!
  9. [RESOLVED] Return a Pointer of a local Array

    Hi there I am trying to return an array of uint8_t so the function serialize returns a pointer uint8_t*.



    #include <iostream>

    uint8_t* serialize () {

    int _size_ = 6;
    int _nedges_ = 7;
  10. Re: How to implement Iterator into my Container

    Jackpot!!
    Thank a lot Paul !! That did solve my problem!
    The example code that I took into consideration from that website was prepared to work with a template.
    Maybe that was more or less the...
  11. Re: How to implement Iterator into my Container

    My Iter is not a template.
  12. Re: How to implement Iterator into my Container

    Could you give me an example how my class could dereferencing the iterator return as an int?



    You are absolutely right, I will take that in mind!
  13. Re: How to implement Iterator into my Container

    Sorry the compiler that I am using is not gcc is g++ and here is the version:



    $ g++ -v
    Using built-in specs.
    Target: i486-linux-gnu
    Configured with: ../src/configure -v...
  14. Re: How to implement Iterator into my Container

    So Paul could you try the following main file with your compiler and see if you get similar results?!
    algo.cpp


    #include <iostream>
    #include <list>
    #include "Set.hpp"

    using std::list;...
  15. Re: How to implement Iterator into my Container

    So first here is my main file that successful compiles:
    algo.cpp


    #include <iostream>
    #include <list>
    #include "Set.hpp"

    using std::list;
    using std::cout;
  16. [RESOLVED] How to implement Iterator into my Container

    Hi there I decide to create a personalised Container for some specific reason and now I would like to implement an Iterator that will basically allow me to iterate over the elements of the container....
  17. Re: Using a class outside the class definition files

    Thanks JohnW@Wessex that solved the issue!!
  18. [RESOLVED] list of list. trying to erase a specific position.

    Hi there I am trying to create a class that will handle graphs using a list of lists data-structure.
    I am having problems creating a remove_edge function!
    Basically using iterator how can a get a...
  19. Re: Using a class outside the class definition files

    Considering the possible solutions from your articles I decide to take out the templates and use simply a C style "typedef int AType".
    This solved the problem.
    Still this was not what I really...
  20. [RESOLVED] Using a class outside the class definition files

    Hi there friends the following 3 files have the aim of using the Matrix class in a file different from the implementation ones. I got an error trying to do this (has you can see in the end of the...
Results 1 to 20 of 20





Click Here to Expand Forum to Full Width

Featured