You should spend more than (literally) five minutes trying this before posting "it doesn't work".
I also note that the latest "complete" program you posted (post #9) didn't compile due to errors.
Start with a simple program that's easy to work with - strip out any unnecessary features (such as user input) so you can focus on the problem at hand.
Code:
#include <stdio.h>
struct picture {
char name[50];
char extension[10];
float size;
char location[50];
int position;
};
void Print(struct picture S)
{
printf("%s %s %f %s %d\n",S.name,S.extension,S.size,S.location,S.position);
}
int main(void)
{
struct picture S[6] = {
{ "Picture-0", "png", 10.0, "C:\\pictures_0", 0 },
{ "Picture-1", "png", 20.0, "C:\\pictures_1", 1 },
{ "Picture-2", "png", 30.0, "C:\\pictures_2", 0 },
{ "Picture-3", "png", 40.0, "C:\\pictures_3", 1 },
{ "Picture-4", "png", 50.0, "C:\\pictures_4", 0 },
{ "Picture-5", "png", 60.0, "C:\\pictures_5", 1 },
};
int i;
for(i = 0; i < 6; i++)
Print(S[i]);
return 0;
}
There, now you have simplified functional program that you experiment with. Once you get the delete function working, that function can be moved back into your main project.
Code:
S[j].size=S[j+1].size;
If you want to get rid of an entire element, you need to overwrite that element, not just a member of that element.
There are also some subtle nuances you need to observe, regarding the limit and indexing variables. A little bit of thought (and some pencil and paper to help sketch these thoughts) should help you see these.
Also, you should not be printing the array from within the delete function - try printing all values of the array in "main()" both before and after the delete function call, so you can see how the data has been changed.