Skip to content

Commit

Permalink
v2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
ordepoas committed May 28, 2021
1 parent d683549 commit 275b328
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Binary file modified a.out
Binary file not shown.
14 changes: 7 additions & 7 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ void escolherPerfil(Perfil *p, int counter){

} else {

for (j = 0; j < p->contaMsg; j++) {
for (j = 0; j < p[x].contaMsg; j++) {

printf("\t\t\tAutor: %s | Mensagem: %s\n", p[x].mural[j].autor,p[x].mural[j].texto);
}
Expand All @@ -441,15 +441,15 @@ void publicarMensagem(Perfil *p, int x){

do {
printf("\t\tNome: ");
fgets(p[x].mural[p->contaMsg].autor, MAX_LENGTH_50, stdin);
p[x].mural[p->contaMsg].autor[strlen(p[x].mural[p->contaMsg].autor)-1] = '\0';
} while (checkString(p[x].mural[p->contaMsg].autor) == 0);
fgets(p[x].mural[p[x].contaMsg].autor, MAX_LENGTH_50, stdin);
p[x].mural[p[x].contaMsg].autor[strlen(p[x].mural[p[x].contaMsg].autor)-1] = '\0';
} while (checkString(p[x].mural[p[x].contaMsg].autor) == 0);

do {
printf("\t\tMensagem: ");
fgets(p[x].mural[p->contaMsg].texto, MAX_LENGTH_200, stdin);
p[x].mural[p->contaMsg].texto[strlen(p[x].mural[p->contaMsg].texto)-1] = '\0';
} while (checkString(p[x].mural[p->contaMsg].texto) == 0);
fgets(p[x].mural[p[x].contaMsg].texto, MAX_LENGTH_200, stdin);
p[x].mural[p[x].contaMsg].texto[strlen(p[x].mural[p[x].contaMsg].texto)-1] = '\0';
} while (checkString(p[x].mural[p[x].contaMsg].texto) == 0);

printf("\n");

Expand Down
2 changes: 1 addition & 1 deletion perfis.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Maria Pedro 24 14 2007 [email protected] Portalegre 2 nome1 mensagem 1 nome2 mensagem 2 João Pedro 24 11 1972 [email protected] portagre 1
João São Pedro 24 11 1972 [email protected] Portalegre 2 nome1 mensagem1 nome2 mensagem2 Sandra Reis 25 5 1974 [email protected] Fundão 1 nome3 mensagem3

0 comments on commit 275b328

Please sign in to comment.