Hello, I'm not sure what I'm doing (i study math/physics not CS) and need some help. I am trying to write a DLL in C such that I can pass in two parameters and return a double. Here is the code:
Code:
#pragma once
#include <stdio.h>
#define DLLF _declspec(dllexport)
DLLF double FractalPriceReturn(double price, bool frac)
{
double fracprice = price;
bool fracflag = frac;
if (fracflag == 2)
{
return fracprice;
}
else return 0;
}
////////
The software (a neural network) I'm using to call the DLL selects the file (the DLL) that I want to use but as soon as I do that it crashes my neural network software. Am I saving the program incorrectly? The code is built in VS. Is there something wrong with my code? (It's been a while). Thanks for any responses.