@pop_cat plz put some effort in ur comments, i see alot of typos and they are hard to read, well, atleast put SOME effort in them, remember, this is not a chat...
#include #define max_fat 10 int fat[max_fat]; void print_it(void); int assign_fat(int nc); void initialize_fat(void); void user(void); void automatic(void); void main(void) { char choice; initialize_fat(); cout<< "\n Do you want to enter your own values? Y" << flush; cin >> choice; if (choice=='y' || choice == 'Y') { user(); } else { cout<< "\n using automatic values" <> pause; } int assign_fat(int nc) { int next, i, count, return_value; next = count= 0; i=1; //check if enough clusters are available for(i=1; i<< "\ncan't assign_fat of " << nc << endl; return -1; } // ok there are enough clusters assign cluster file i=1; count =0; do { if(fat[i]==0)//start { if(count==0)// this is the index value { return_value = i; } next=i; do { next++;// next value that is '0' }while (fat[next] !=0 ); count++;//assigned another cluster fat[i] = next; } //assign nc worth of
what???