i need help with this program , all it does is stream one file to an output file but it doesnt sound right when it is finish. can someone review this code and help me.
Code:#include <iostream> #include <fstream> using namespace std; int main() { int s=0; char buffer[10240]; char name[1024]; ofstream out ("out.mp3", ios::trunc); out.close(); out.open("out.mp3", ios::app); ifstream in ("Bad_...........mp3"); in.seekg(s, ios::beg); in >> buffer; out<< buffer; out<<" "; s = s+strlen(buffer)+1; out.close(); while (s != 0) { ofstream out ("out.mp3", ios::app); ifstream in ("Bad_...........mp3"); in.seekg(s, ios::beg); in >> buffer; if (buffer != NULL and buffer != ""); { out<< buffer; out<<" "; s = s+strlen(buffer)+1; out.close(); } if (buffer == NULL) { out<< buffer; out<<"/n"; s = s+strlen(buffer)+1; out.close(); } if (buffer == "") { out<< buffer; out<< " "; s = s+strlen(buffer)+1; out.close(); } if (buffer == " ") { out<< buffer; out<< " "; s = s+strlen(buffer)+1; out.close(); } } }



LinkBack URL
About LinkBacks



I used to be an adventurer like you... then I took an arrow to the knee.