Helper library for ORSI.
- If you don't have CMake installed with a C++ compiler you should do it now!
- Download or clone the repository then navigate to the build directory.
cmake .
make all -j4
- Copy the libEvaluator to the desired location with the required header math_evaluator.h found in include.
Reference main.cpp:
#include "math_evaluator.h"
#include <iostream>
int main()
{
MathEvaluator evaluator("x+2");
std::cout << evaluator.calculate(3) << std::endl;
return 0;
}
- Compile your code and link the lib.
g++ main.cpp -L . -l Evaluator
- Run your code!
./a.out
5
- (not needed if done already) If you don't have CMake installed with a C++ compiler you should do it now!
- (not needed if done already) Download or clone the repository then navigate to the build directory.
cmake .
make all -j4
- Copy the libBMPWriter to the desired location with the required header bmp_image.h found in include.
Reference main.cpp:
#include "bmp_image.h"
#include <fstream>
int main()
{
BMPImage image(640, 480);
for(uint32_t ColIndex = 100; ColIndex < 300; ColIndex++)
{
for(uint32_t RowIndex = 250; RowIndex < 300; RowIndex++)
{
image.setColor(ColIndex, RowIndex, Color(255, 0, 0));
}
for(uint32_t RowIndex = 30; RowIndex < 80; RowIndex++)
{
image.setColor(ColIndex, RowIndex, Color(0, 255, 0));
}
}
std::ofstream out("output.bmp");
out << image;
out.close();
return 0;
}
- Compile your code and link the lib.
g++ main.cpp -L . -l BMPWriter
- Run your code!
./a.out
5