Appending a file to all specified files (*.cpp) recursively
Posted on 2004-04-20
I'd like to append some copy consturctor code
Foo::Foo(const Foo&r) // copy constructor
copy ( r);
Foo& Foo::operator=(const Foo&r) // assgnment operator
return copy ( r);
Foo& Foo::copy(const Foo&r)
// assign each element to is corresponding value in our object
to the end of all my *.cpp files recursively.
I know manually, I can do
cat constructorfile.txt >> acppfile.cpp
but I'd like this to be automated.
Also, if you can, if the file that I just appended to can replace the instance of "Foo" with the filename (whihc is the same as the class... like MyClass.cpp), that would be most helpful.