|    
			
				29/03/2008, 01:17
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: marzo-2008 
						Mensajes: 22
					 Antigüedad: 17 años, 7 meses Puntos: 1 |  | 
  |  Re: [B]poner espacios en un vector[/B]  
  Espero que esto te sea lo que buscas.///////////////////////////////////////////////////////////////////////////////////////////////////////
 #include <stdio.h>
 #include <conio.h>
 #include <string.h>
 
 void StrInsertText(char *dst, char *src)
 {
 long len;
 char *aux;
 
 aux = dst;
 len = strlen(src);
 if(len)
 {
 aux = dst + len;
 len = strlen(dst);
 memcpy(aux, dst, len);
 aux += len;
 }
 len = strlen(src);
 if(len)
 {
 memcpy(dst, src, len);
 }
 *aux = 0;
 }
 int main()
 {
 char *p;
 char sz[250];
 
 strcpy(sz, "(hola)");
 printf("sz(Antes): %s\n", sz);
 
 p = strchr(sz, '(');		// Buscar el inicio del paréntesis
 if(p != NULL)
 StrInsertText(p + 1, "     ");
 printf("sz(Despues 1): %s\n", sz);
 
 p = strchr(sz, ')');		// Buscar el final del paréntesis
 if(p != NULL)
 StrInsertText(p, "     ");
 printf("sz(Despues 2): %s\n", sz);
 
 getch();
 return 0;
 }
     |