This is for example, a small code where i read array in a file. My problem is, i want to read a wave file and convert its binany form to array of integer, Please help....
#include <iostream>
#include <fstream>
using namespace std;
int i(0), array_index(0);
int *p1 = new int[BUFSIZ];
ifstream readfile;
void Read_File(){
readfile.open("file.txt");
while(!readfile.eof()) {
readfile >> p1[array_index];
array_index++;
}
array_index--;
readfile.close();
for(i = 0; i < array_index; i++){
cout<<" "<<p1[i];
}cout<<endl;
}
int main(int argc, char* argv[]){
Read_File();
delete[] p1;
}