Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int length=sizeof(array1)/sizeof(array1[0]); //For length of array
- deleteElement(array1,length,4);
- cout<<"nIn main functionn";
- for(int i=0;i<length;i++){
- cout<<array1[i];
- }
- return 0;
- int i=0;
- for(int i;i<length;i++)
- {
- if(array2[i]==element)
- {
- for(int j=i;j<length;j++)
- {
- array2[j]=array2[j+1];
- }
- break;
- }
- }
- if(i==(length-1)){
- cout<<("Element doesn't exist n");
- }
- cout<<"Testing OP in deleteElement n";
- for(int i=0;i<length;i++){
- cout<<array2[i];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement