Hi purplepit-ga,
I wrote and tested all of the code
and put it here:
http://nms.lcs.mit.edu/~gch/google/postfix.tar.gz
Instructions on how to compile and run
the programs are at the top of their files.
Please let me know how it works out.
dogbite-ga |
Request for Answer Clarification by
purplepit-ga
on
05 May 2003 10:46 PDT
Hi again,
I can only seem to access the infixToPostfix.h, and stringstack.h, but
nothing else or any instrutions on how to run or compile!!!
can you please dogbite-ga
thanks
|
Clarification of Answer by
dogbite-ga
on
05 May 2003 10:58 PDT
Hi purplepit-ga,
Sure, I will help you -- I don't totally
understand the problem though. Are you
saying the postfix.tar.gz file you downloaded
only contained two header files? I just
tried downloading the file and everything
was there.
I have put all the files here:
http://nms.lcs.mit.edu/~gch/google/postfix/
Please go into that directory and download
each of the files individually. The instructions
are at the top of the .cc files. For example:
//////////////////////////////////////////
// File: pushnames.cc
// Date: 05/05/2003
// Notes: A simple program to read in 5 names
// from standard in and put them on the
// stack. Then pop them all off, displaying
// the stack each time. (Part 1)
//
// To compile:
//
// g++ -o pushnames pushnames.cc stringstack.o
//
// To run:
//
// pushnames
//
//////////////////////////////////////////
Please let me know if that works for you.
dogbite-ga
|
Clarification of Answer by
dogbite-ga
on
05 May 2003 14:04 PDT
Hey purplepit-ga,
Were you able to retrieve the
files successfully?
dogbite-ga
|
Request for Answer Clarification by
purplepit-ga
on
08 May 2003 11:46 PDT
Hi dogbite, I tried running this today on Unix and got the initial
error message saying "strihgstack.o not found!!!" and having said
that, I couldn't find the code for it in the downloaded files!!
In addition to this I am using the g++ compiler, but to run we use
/a.out, will this still work? and can you help! or possibly modify the
code for use with visual c++
even if you only manage say parts one and two!!!!!
Thanks
Purplepit-ga
|
Clarification of Answer by
dogbite-ga
on
08 May 2003 12:01 PDT
Hi purplepit-ga,
I don't totally understand what went
wrong. Can you please paste exactly
what you typed into the UNIX prompt
and exactly what the error message was?
dogbite-ga
|
Request for Answer Clarification by
purplepit-ga
on
08 May 2003 13:43 PDT
Hi ,
Firsty I used an emacs editor to create all the programs, and then
when trying to run the program that included the "stringstack.o" think
it was "pushnames.cc"(am at home now so am not using unix, the error
was I think "stringstack.o no such file or directory"
will be willing to give you another good tip if you can help.....
Purplepit-ga
|
Clarification of Answer by
dogbite-ga
on
08 May 2003 14:08 PDT
Hi purplepit-ga,
I'm sorry. You first need to type
g++ -o pushnames pushnames.cc stringstack.cc
to compile the pushnames executable.
The other compilation instructions
look like they will work just fine.
Please let me know how it works for you.
dogbite-ga
|
Request for Answer Clarification by
purplepit-ga
on
09 May 2003 10:07 PDT
Hi dogbite-ga
It's me again, I but you wished you never attempted this question!!
Anyway it still doesn't seem to work!! too many errors to even
contemplate ploughing through, maybe it's got something to do with the
system we use to run programs on, I really dont know.
What I need as a last ditch attempt to get at least some output, is a
visual c++ program(.cpp) for just the first part!! if you could modify
you're program to do the same thing as is required, it would be much
appreciated.
Purplepit-ga
|
Clarification of Answer by
dogbite-ga
on
09 May 2003 10:36 PDT
Hi purplepit-ga,
I do not have Visual C++, so I cannot
provide that program. Also, there is
nothing special about the code -- no
special libraries or anything that I
know of -- so it should compile on
your Visual C++ system just fine.
It's possible that I could help you
get it running on your linux machine.
Can you paste part of the error?
Also, here is an example execution
of the pushnames program:
$ ./pushnames
Enter a name:
Alice Apple
Enter a name:
Bob Bear
Enter a name:
Chris Creame
Enter a name:
Dan Delicious
Enter a name:
Fatty Frank
The Stack
5: Fatty Frank
4: Dan Delicious
3: Chris Creame
2: Bob Bear
1: Alice Apple
The Stack
4: Dan Delicious
3: Chris Creame
2: Bob Bear
1: Alice Apple
The Stack
3: Chris Creame
2: Bob Bear
1: Alice Apple
The Stack
2: Bob Bear
1: Alice Apple
The Stack
1: Alice Apple
dogbite-ga
|