Arithmetic
to do common mathematical operations such as addition, subtraction, multiplication, and division. The code should resemble:Arithmetic
. The code should resemble:cl /c /EHsc MathLibrary.cpp
to compile the code and create an object file that's named MathLibrary.obj. (The cl
command invokes the compiler, Cl.exe, and the /c
option specifies compile without linking. For more information, see /c (Compile Without Linking).) Second, run lib MathLibrary.obj
to link the code and create the static library MathLibrary.lib. (The lib
command invokes the Library Manager, Lib.exe. For more information, see LIB Reference.)MathClient.cpp
.MathClient.cpp
.MathLibrary.h
header file, you must modify the included directories path. In Solution Explorer, right-click on MathClient to open the shortcut menu. Choose Properties to open the MathClient Property Pages dialog box.Arithmetic
class in this app by including the #include 'MathLibrary.h'
header in your code. Replace the contents of MathClient.cpp
with this code: