Search:

Type: Posts; User: federico

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    2,607

    Passing Vector

    How do I get this to work?

    I have a Vector<string> maze; which is passed on to this function:



    void load( Vector<string> maze)
    {
    height_ = maze.size();
    if(height_ == 0) return;
  2. Replies
    7
    Views
    1,920

    Also, I'm a little confused now on how I should...

    Also, I'm a little confused now on how I should call the functions for those pointers.
    suppose I declare now:



    stack_ = new arrayStack(width_);


    and then later on I want to return a...
  3. Replies
    2
    Views
    838

    iterator string

    59: string::iterator it = line.begin();
    60: int j = 0;
    61: for ( ; it < line.end(); it++)
    62: for ( ; j < width_; j++ )
    63: maze_[i][j] = *it;


    compiler says:
    61: error: ‘it’ was...
  4. Replies
    7
    Views
    1,920

    OMG! I"m retarded!! Ofcourse they need to be...

    OMG! I"m retarded!!

    Ofcourse they need to be pointers!!

    And yes, those constructors belong to the same header files.
    You're a life saver dawg!
  5. Replies
    7
    Views
    1,920

    how so? these are the contructors: Stack: ...

    how so?

    these are the contructors:
    Stack:



    template<class T>

    arrayStack<T>::arrayStack(int initialCapacity)
  6. Replies
    7
    Views
    1,920

    Ok, I understand. I had a feeling that was it....

    Ok, I understand. I had a feeling that was it. But what do you mean by that? Because if I declare them


    arrayStack<int> stack_;


    My compiler still complains:

    maze.cpp:14: error:...
  7. Replies
    7
    Views
    1,920

    stubborn Stack and Queue

    Hi all,

    Here's the deal, I have two data structures ( a stack and a queue ) implementing in a "rat in a maze" classic solver.
    for the sake of the reader and not to make this thread extra long, I...
  8. Replies
    6
    Views
    3,205

    ujhahahahahhahh!!! how did you do that??

    ujhahahahahhahh!!! how did you do that??
  9. Replies
    6
    Views
    3,205

    o wow.. I'm still getting: In file...

    o wow..
    I'm still getting:




    In file included from myDataStruct.cpp:12:
    myDataStruct.h: In member function ‘void myDataStruct<T>::output(std::ostream&) const’:
    myDataStruct.h:140: error:...
  10. Replies
    6
    Views
    3,205

    ostream_iterator

    I have a code snippet given by my instructor in data structures.



    template<class T>
    void myDataStruct<T>::output(ostream& out) const
    {// Put the list into the stream out.
    copy(element,...
Results 1 to 10 of 12