Re[2]: необязательный параметр
От: Bell Россия  
Дата: 09.07.03 12:44
Оценка: +1
Здравствуйте, Alexey Shirshov, Вы писали:


AS>Используй указатель вместо ссылки. Если же очень охота, то можно типа такого написать (работает только на неприличных компиляторах, типа VC и считается очень дурным тоном)

AS>
AS>int SetOutput(string &xmlstream = *(string*)0);
AS>


Еще бы


8.3.2/4
There shall be no references to references, no arrays of references, and no pointers to references. 
The declaration of a reference shall contain an initializer (8.5.3) except when the declaration 
contains an explicit extern specifier (7.1.1), is a class member (9.2) declaration within a class 
declaration, or is the declaration of a parameter or a return type (8.3.5); see 3.1. 
A reference shall be initialized to refer to a valid object or function. 
[Note: in particular, a null reference cannot exist in a well-defined program, 
because the only way to create such a reference would be to bind it to the “object” obtained 
by dereferencing a null pointer, which causes undefined behavior. As described in 9.6, a 
reference cannot be bound directly to a bitfield.]
Любите книгу — источник знаний (с) М.Горький
Re: необязательный параметр
От: hellas Россия  
Дата: 10.07.03 01:05
Оценка:
А если так

int SetOutput(string *xmlstream = NULL);
This software required Windows 95 or better...
So I installed Linux
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.