Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- #include <string.h>
- #define QUANTIDADE_NOMES 2
- #define TAMANHO_LOCAL 256
- const char *NOMES[QUANTIDADE_NOMES] = {
- "Joao",
- "Maria"
- };
- void formata_local(char *local, const char *nome, const char *caracteristica) {
- sprintf(local, "%s_local\\%s_%s", nome, nome, caracteristica);
- }
- int main(int argc, char *argv[]) {
- int i = 0;
- int j = 0;
- char local[TAMANHO_LOCAL] = "";
- for (i = 0; i < QUANTIDADE_NOMES; i++) {
- SetTag("Nome", NOMES[i]);
- SetTag("AmbienteLoLo", formata_local(local, NOMES[i], "lolo"));
- SetTag("AmbienteLo", formata_local(local, NOMES[i], "lo"));
- SetTag("AmbientePv", formata_local(local, NOMES[i], "pv"));
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment