[rescue] eBay ID

Joshua D Boyd jdboyd at cs.millersville.edu
Thu Dec 5 15:35:54 CST 2002


On Thu, Dec 05, 2002 at 03:53:43PM -0500, Michael A. Turner wrote:
> 	Now to defend myself I will declare that this is C++ and that all
> variables with $ in front of them are made variables in the class contained
> inside computerstuff.h . Also that makes room for overloaded operators such
> as == and != which operate  the same but take the new variable type. Plus I
> changed the order of operation in the .h file. So all I have to add to my
> explanation is:

Man, that is one header file I'd love to see.  Did you also manage to
make a nice foreach macro so that I can do things like:

foreach (a, myMap, map<string, int>) 
	cout << (*a).first << " " << (*a).second << endl;

I tried to write a macro that would take the foreach line and expand it
to: 

for(map<string, int>::iterator a = myMap.begin(); a!=myMap.end(); a++),
but just couldn't quite make it work.  I wish I could remeber where I
dropped that source code.

-- 
Joshua D. Boyd



More information about the rescue mailing list