Could anyone explain the problem im having on line 28,
(value = amp*sin(2*pi*freq*t);)
i keep getting this error message
28 11 [Error] cannot convert 'double' to 'float*' in assignment
#include <cstdlib>
#include <iostream>
#include <math.h>
#include "dp_lib.h"
using namespace std;
int main()
{
double pi=3.141592653589793238462643383279502884197169399375;
float* value;
unsigned long length = 44100; // sample rate
int freq = 1000; //frequency
int t = 1;
int duration;
int amp = 1; // size of the wave
value = (float* ) allocate_memory(length);
FILE* fp = fopen("myaudio.wav", "wb"); // open file
// loop to generate audio samples
for(int n = 0; n < length; n++) //where n is the step |start of for loop
{
int t = n/freq; //t/freq
value = amp*sin(2*pi*freq*t);
write_wav_file(data, length, fs, fp);
cout << n << "\t" << value <<"\n";
} // | end of for loop
fclose(fp); // close file
free(fp); // release memory
cout << "\n\n";
system ("pause");
}