Sorry I could not include all the code as it was over the 8192 length limit so I only included some parts of a struct that were related to the error.
[code]
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <string>
#include "GibbsMix.h"
#include "rand_num.h"
#include "chartdir.h"
#include "MetropHMix.h"
#include <SDL.h>
#include <SDL_main.h>
#include <SDL_test.h>
#include <SDL_timer.h>
#include <C:\Users\PMbanugo\Documents\pdf_monte_carlo\unzipped_pdf\CodeCogs[PDF]\codecogs\statistics\distributions\continuous\normal\pdf.h>
//#include <armadillo>
#include <pdf.h>
#include <list>
#include <random>
#include <iterator>
#include <array>
#include <time.h>
#include <math.h>
#include <vector>
#include <complex>
#include <iomanip>
using std::string;
using std::cerr;
using std::cout;
using std::cin;
using std::endl;
using std::list;
struct distanceTrav {
//distanceTrav * travptr;
static double millmtrSph;
static double centmtrSph;
static double totalDistSph; //in millimetres
static double distCollectSph;
static double millmtrCyl;
static double centmtrCyl;
static double totalDistCyl; //in millimetres
static double distCollectCyl;
static double millmtrPla;
static double centmtrPla;
static double totalDistPla; //in millimetres
static double distCollectPla;
static void raisemillMtrSph(struct distanceTrav &d1, const double& magnitude) {//call 1st
d1.millmtrSph += magnitude;
}
static void checkDistTrvSph(struct distanceTrav &d1) { //call2nd
if (d1.millmtrSph > 10.0) {
d1.millmtrSph = 0;
d1.centmtrSph += 1;
}
}//1
static void distTrvSph(struct distanceTrav &d1) {//call 3rd
d1.totalDistSph += (d1.centmtrSph*10.0) + d1.millmtrSph;
d1.distCollectSph = d1.totalDistSph;
}//1
static void raisemillMtrCyl(struct distanceTrav &d1, const double& magnitude) {//call 1st
d1.millmtrCyl += magnitude;
}//2
static void checkDistTrvCyl(struct distanceTrav &d1) { //call2nd
if (d1.millmtrCyl > 10.0) {
d1.millmtrCyl = 0;
d1.centmtrCyl += 1;
}
}//2
static void distTrvCyl(struct distanceTrav &d1) {//call 3rd
d1.totalDistCyl += (d1.centmtrCyl*10.0) + d1.millmtrCyl;
d1.distCollectCyl = d1.totalDistCyl;
}//2
static void raisemillMtrPla(struct distanceTrav &d1, const double& magnitude) {//call 1st
d1.millmtrPla += magnitude;
}//3
static void checkDistTrvPla(struct distanceTrav &d1) { //call2nd
if (d1.millmtrPla > 10.0) {
d1.millmtrPla = 0;
d1.centmtrPla += 1;
}
}//3
static void distTrvPla(struct distanceTrav &d1) {//call 3rd
d1.totalDistPla += (d1.centmtrPla*10.0) + d1.millmtrPla;
d1.distCollectPla = d1.totalDistPla;
}//3
static void totalDistCont1(struct distanceTrav &d1, std::string setting, const int& iteration) {
cout << "Total distance travelled of photon under the " << setting << " setting on iteration" << iteration << " is " << d1.totalDistSph << " mm." << endl;
}
static void totalDistCont2(struct distanceTrav &d1, std::string setting, const int& iteration) {
cout << "Total distance travelled of photon under the " << setting << " setting on iteration" << iteration << " is " << d1.totalDistCyl << " mm." << endl;
}
static void totalDistCont3(struct distanceTrav &d1, std::string setting, const int& iteration) {
cout << "Total distance travelled of photon under the " << setting << " setting on iteration" << iteration << " is " << d1.totalDistPla << " mm." << endl;
}
static void totalDistPulsed1(struct distanceTrav &d1, std::string setting, const int& iteration) {
cout << "Total distance travelled of photon under the " << setting << " setting on iteration" << iteration << " is " << d1.totalDistSph << " mm." << endl;
}
static void totalDistPulsed2(struct distanceTrav &d1, std::string setting, const int& iteration) {
cout << "Total distance travelled of photon under the " << setting << " setting on iteration" << iteration << " is " << d1.totalDistCyl << " mm." << endl;
}
static void totalDistPulsed3(struct distanceTrav &d1, std::string setting, const int& iteration) {
cout << "Total distance travelled of photon under the " << setting << " setting on iteration" << iteration << " is " << d1.totalDistPla << " mm." << endl;
}
static void lyr1DelineateSph(struct distanceTrav &d1, double skinthicknessV1) {
double epidermalProp = 0.10*skinthicknessV1;
if (d1.totalDistSph < epidermalProp) {
cout << "Photon is still in the epidermis (spherical axis)." << endl;
}
else if (d1.totalDistSph = epidermalProp) {
cout << "Photon is still at the epidermal-dermal boundary(spherical axis)." << endl;
}
else {
cout << "Photon entered the dermis(spherical axis)." << endl;
}
}
static void lyr1DelineateCyl(struct distanceTrav &d1, double skinthicknessV1) {
double epidermalProp = 0.10*skinthicknessV1;
if (d1.totalDistCyl < epidermalProp) {
cout << "Photon is still in the epidermis (cylindrical axis)." << endl;
}
else if (d1.totalDistCyl = epidermalProp) {
cout << "Photon is still at the epidermal-dermal boundary(cylindrical axis)." << endl;
}
else {
cout << "Photon entered the dermis(cylindrical axis)." << endl;
}
}
static void lyr1DelineatePla(struct distanceTrav &d1, double skinthicknessV1) {
double epidermalProp = 0.10*skinthicknessV1;
if (d1.totalDistPla < epidermalProp) {
cout << "Photon is still in the epidermis (planar axis)." << endl;
}
else if (d1.totalDistPla = epidermalProp) {
cout << "Photon is still at the epidermal-dermal boundary(planar axis)." << endl;
}
else {
cout << "Photon entered the dermis(planar axis)." << endl;
}
}
static void lyr1lyr2DelineateSph(struct distanceTrav &d1, double skinthicknessV2) {
double epidermalProp = 0.10*skinthicknessV2;
double dermalProp = 0.90*skinthicknessV2;
if (d1.totalDistSph >epidermalProp && d1.totalDistSph<dermalProp) {
cout << "Photon in the dermis (spherical axis)." << endl;
}
if (d1.totalDistSph > dermalProp) {
cout << "Photon has entered the subcutaneous tissue (spherical axis)." << endl;
}
}
static void lyr1lyr2DelineateCyl(struct distanceTrav &d1, double skinthicknessV2) {
double epidermalProp = 0.10*skinthicknessV2;
double dermalProp = 0.90*skinthicknessV2;
if (d1.totalDistCyl >epidermalProp && d1.totalDistCyl<dermalProp) {
cout << "Photon in the dermis (spherical axis)." << endl;
}
if (d1.totalDistCyl > dermalProp) {
cout << "Photon has entered the subcutaneous tissue (spherical axis)." << endl;
}
}
static void lyr1lyr2DelineatePla(struct distanceTrav &d1, double skinthicknessV2) {
double epidermalProp = 0.10*skinthicknessV2;
double dermalProp = 0.90*skinthicknessV2;
if (d1.totalDistPla >epidermalProp && d1.totalDistPla<dermalProp) {
cout << "Photon in the dermis (spherical axis)." << endl;
}
if (d1.totalDistPla > dermalProp) {
cout << "Photon has entered the subcutaneous tissue (spherical axis)." << endl;
}
}
}
[/code]