Показать сообщение отдельно

  #3569  
Старый 19.08.2009, 08:57
St0nX
Участник форума
Регистрация: 19.05.2007
Сообщений: 281
С нами: 9989619

Репутация: 106
По умолчанию

PHP код:
stringappend ( const stringstr );
    
Appends a copy of str.
stringappend ( const stringstrsize_t possize_t n );
    
Appends a copy of a substring of strThe substring is the portion of str that begins at the character position pos and takes up to n characters (it takes less than n if the end of string is reached before).
    If 
the position passed is past the end of stran out_of_range exception is thrown
stringappend ( const char ssize_t n );
    
Appends a copy of the string formed by the first n characters in the array of characters pointed by s.
stringappend ( const char );
    
Appends a copy of the string formed by the null-terminated character sequence (C stringpointed by sThe length of this character sequence is determined by the first ocurrence of a null character (as determined by traits.length(s)).
stringappend size_t nchar c );
    
Appends a string formed by the repetition n times of character c
Потому и нельзя
PHP код:
 int n 5;
    
string str "test";

    
str.append((char *)n);
    
cout << str
если только так и это уже будет не число. или так

PHP код:
 int n 5;
 
char f[5];
    
string str "test";
   
itoa(n,f,10);
    
str.append(f);
    
cout << str

Последний раз редактировалось St0nX; 19.08.2009 в 13:14..
 
Ответить с цитированием