C++相談室 part66at TECH
C++相談室 part66 - 暇つぶし2ch115:デフォルトの名無しさん
09/02/18 23:00:43
>>114
#include <iostream>

void func() { std::cout << "This is ::func()" << std::endl; }

namespace AAA
{

void func() { std::cout << "This is AAA::func()" << std::endl; }

void aaa() {
func(); // AAA名前空間のfunc()が呼ばれる
::func(); // グローバル名前空間のfunc()が呼ばれる
}

}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch