Fraction Library
A C++ Fraction library.

PartialLib.h File Reference

This file allows you to compile a library which supports only Fraction or MFraction or both. More...

Go to the source code of this file.


Detailed Description

This file allows you to compile a library which supports only Fraction or MFraction or both.

Right now, it is set up to support both Fraction and MFraction classes and their associated operations.

Uncomment the first block (the 3 lines) of code to only have Fraction class functionality. That is, fractions that can be expressed as decimal or improper only. Do not use MFraction specific operations in this case.

If you want to express fractions as improper, mixed or decimal, uncomment the second block (the final 3 lines) of code to only have MFraction class functionality. Do not use Fraction specific operations in this case.

Suffice to say, both blocks should not be commented out at the same time. If you do this, you will lose both Fraction and MFraction functionality.

Note:
This is only meant for efficiency (as you can decide not to compile functionality you do not need). If you are using this library for the first time and a little new at C/C++ programming, leave the code below alone. With the current setup (both blocks commented out), everything in the library will be compiled.
Steps to Take:
  • Uncomment the first 3 lines for Fraction functionality only OR the last 3 lines for MFraction functionality only.
  • Build/compile the lib_create project using Microsoft Visual C++ by right-clicking on the project name and selecting build. The .lib output file is located in /lib directory. If you are using the Debug configuration, which is the default, then the output file will be in the /lib/Debug subdirectory.
  • Link the library file into your external project. See the projects in the /tests directory for examples as to how to do this.

Definition in file PartialLib.h.