0
Hello. I have a C algorithm to delete a user but not interact in the array:
#include<stdio.h>
#include<stdlib.h>
#include<locale.h>
#include<conio.h>
#define numeroUSER 100
char nome[numeroUSER][100] = {"João Carlos","Maria Luisa","Pedro José", "Gerente"};
int main() {
excluirUsuario();
}
void excluirUsuario() {
int indice=0;
printf("informe o indice: \n");
scanf("%d", &indice);
for (int i=0; i<numeroUSER; i++) {
nome[i]100] = nome[i+1][100];
}
}
If I type the index 0, I want you to delete John from the list, since it is the first and remain the rest. The algorithm does not exclude and I end up deleting part of the names, that is, I can position myself in the string, but I can’t position myself between the indexes with the names. How do I delete this. Note, it is a programming logic treatise.
Hello Andre you have to enter the name and on top of that name find and delete from the array? It will have 100 names each array?
– Maurício Z.B