Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Claudio Neto

Inserir mais dados em uma variável preenchida

Recommended Posts

Tem como eu fazer algo assim:

sVariavel = "a";
//rotina
sVariavel = sVariavel & "b";

Ou seja, passar uma string para a variável, e depois de alguns comandos, inserir mais alguma string, juntando o que tinha antes mais o que quero por agora?

 

Obrigado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

SYNOPSIS

#include <string.h>

 

char *strcat(char *restrict s1, const char *restrict s2);

 

 

DESCRIPTION

The strcat() function shall append a copy of the string pointed to by s2 (including the terminating null byte) to the end of the string pointed to by s1. The initial byte of s2 overwrites the null byte at

the end of s1. If copying takes place between objects that overlap, the behavior is undefined.

 

RETURN VALUE

The strcat() function shall return s1; no return value is reserved to indicate an error.

 

Se for em C++ use a classe string e o operador +.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.