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;
Type: Posts; User: federico
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;
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...
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...
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!
how so?
these are the contructors:
Stack:
template<class T>
arrayStack<T>::arrayStack(int initialCapacity)
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:...
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...
ujhahahahahhahh!!! how did you do that??
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:...
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,...