Here is the code, tried fixing it for a hour now...
I get
Code:
|12|error: 'Transmittance' was not declared in this scope
|12|error: expected ';' before 'PropylAcetate'
Thank you for returning my sanity!
main.cpp:
Code:
#include <iostream>
#include <fstream>
#include <cstdlib>
#include "reinterpret.h"
#include "Transmittance.h"
using namespace std;
int main()
{
Transmittance PropylAcetate(3696);
return 0;
}
Transmittance.cpp
Code:
#include "Transmittance.h"
Transmittance::Transmittance(int SIZE)
{
ifstream ifs ("jon_spec.SPA", ios::in|ios::binary);
if (ifs.is_open())
{
TransmittancePercent* = new float [SIZE];
ifs.seekg (0x568, ios::beg);
ifs.read( addr(TransmittancePercent), sizeof(TransmittancePercent) );
ifs.close();
}
else
{
cout << "Unable to open SPA file";
}
}
Transmittance.h
Code:
#define TRANSMITTANCE_H
#ifndef TRANSMITTANCE_H
#include <iostream>
using namespace std;
class Transmittance
{
private:
float* TransmittancePercent;
float start, end, multiple;
int size;
public:
Transmittance(int);
};
#endif