Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ISBN::ISBN(const char* str, const ISBNPrefix& list){ // Constructor With Arguements To Set The ISBN -
- // Back To It's Previous State.
- char s[11];
- strcpy(isbn, str);
- int val;
- int a = 0;
- int b = 0;
- int c;
- reg = decode(list);
- val = valid(str);
- if(val == 1 && reg == 1){
- mod[0] = '-';
- mod[1] = '\0';
- }
- else if(reg == 0){
- for(c = 0; c < 5 && (isbn[c] != '\0'); c++){ // For Loop To Add Area Back To ISBN.
- area[c] = isbn[c];
- area[c + 1] = '\0';
- }
- for(c = (strlen(area) - 1); c < 7; c++){ // For Loop To Add Publisher Back To ISBN.
- publisher[b] = isbn[c];
- publisher[b + 1] = '\0';
- b++;
- }
- for(int c = ((strlen(area)) + (strlen(publisher))); c < 9; c++){ // For Loop To Add Title Back To ISBN.
- title[a] = isbn[c];
- title[a+1] = '\0';
- a++;
- mod[0] = '\0';
- }
- }
- else{
- *this = ISBN(); // Returns Current Object.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement