Question: C++ main.cpp- 1- 3- Create all the included header files (circle.hpp, filled_circle.hpp .... etc). Then compile and run main.cpp , which will write on disk

C++

main.cpp-

1-

C++ main.cpp- 1- 3- Create all the included header files (circle.hpp, filled_circle.hpp

.... etc). Then compile and run main.cpp, which will write on disk

3-

two text files ("shapes.txt" )with expected output (3rd image). Do not modify

Create all the included header files (circle.hpp, filled_circle.hpp .... etc).

Then compile and run main.cpp, which will write on disk two text files ("shapes.txt" )with expected output (3rd image). Do not modify main.cpp.

C++ only

1 #include "circle. hpp" #include "filled.circle.hpp.. 3 include "rectangle.hpp" #1nclude #1nclude "filled-rec tang le.hpp" "read-shape.hpp" 5 *include include & shapes, std: :ostream& out ) 14 15 16 17 18 19 void writeto file for (auto& s shapes) s-writel out); vectorread_shapes std::istreams in) vectorread_from file std::string const& filenane) 43 std::ifstream inputi filename; return read_shapest input 45 46 49 int naint 51 vector > shapes; shapes.push_back( make unique Circe Point5,5, 18 shapes.push_back make unique Circle Pointi-1,-1, 5 shapes. push back make uniquecRectangle Point11,1, Pointi18,10 shapes. push-back( make-uniqueFilled-Circles( Point(-5,1), 17 ] ); shapes, push-back( make-unique Filled-Rec tang le>{ Point {2,), Point(8,1 53 ) ); 56 57 write to file shapes, "shapes.txt" 59 60 61 vectore unique-ptrcShape> > shapes2( read-from-file( write to ilel shapes2, "shapes2.txt" ; "shapes . txt" ); 1 circle (5,5) 10 2 circle (-1,-1) 5 3 rectangle (1,1) (10,10) 4 filled circle (-5,1) 17 5 iled_rectangle (2,0) (8,10) 1 #include "circle. hpp" #include "filled.circle.hpp.. 3 include "rectangle.hpp" #1nclude #1nclude "filled-rec tang le.hpp" "read-shape.hpp" 5 *include include & shapes, std: :ostream& out ) 14 15 16 17 18 19 void writeto file for (auto& s shapes) s-writel out); vectorread_shapes std::istreams in) vectorread_from file std::string const& filenane) 43 std::ifstream inputi filename; return read_shapest input 45 46 49 int naint 51 vector > shapes; shapes.push_back( make unique Circe Point5,5, 18 shapes.push_back make unique Circle Pointi-1,-1, 5 shapes. push back make uniquecRectangle Point11,1, Pointi18,10 shapes. push-back( make-uniqueFilled-Circles( Point(-5,1), 17 ] ); shapes, push-back( make-unique Filled-Rec tang le>{ Point {2,), Point(8,1 53 ) ); 56 57 write to file shapes, "shapes.txt" 59 60 61 vectore unique-ptrcShape> > shapes2( read-from-file( write to ilel shapes2, "shapes2.txt" ; "shapes . txt" ); 1 circle (5,5) 10 2 circle (-1,-1) 5 3 rectangle (1,1) (10,10) 4 filled circle (-5,1) 17 5 iled_rectangle (2,0) (8,10)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!