【初心者歓迎】C/C++室 Ver.41【環境依存OK】
at TECH
504:デフォルトの名無しさん
07/08/20 22:26:44
>495
URLリンク(www.open-std.org)
によると、
> Including the header <cxxx> declares a C name in namespace std.
> Including the header <xxx.h> declares a C name in namespace std (effectively by including
> <cxxx>), then imports it into the global namespace with an individual using declaration.
ということで、xxx.h だと std とグローバル両方で宣言されるというのが規格の意図らしい。
なので、BCB2006 の挙動は(それだけ見ると)規格に合致している。
が、現実的には
> If you want to assuredly declare a C name in the global namespace, include <xxx.h>.
> You may or may not also get the declaration in namespace std.
> If you want to assuredly declare a C name in namespace std, include <cxxx>.
> You may or may not also get the declaration in the global namespace.
ということで、>495 が妥当な仮定。
規格もこの現状を追認する形での修正が提案されている。
>502
自分がやりたいと思っていることをもうちょい正確に表現して欲しい。
文字が表示されて欲しいのか、文字コードが表示されて欲しいのかどっち?
入力として考えているのはどんなデータ?外部から与えられる文字列か、文字列リテラルか。文字コードは?
次ページ続きを表示1を表示最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5109日前に更新/231 KB
担当:undef