コード例 #1
0
int main(int argc, char** argv) {
  Something a;
  Something b(42);
  if (a.showMe() == 42) {
    Something b;
    cout << "a is 42. Showing b: " << b.showMe() << endl;
  } else {
    cout << "a isn’t 42. Showing b: " << b.showMe() << endl;
  }
}
コード例 #2
0
ファイル: main.cpp プロジェクト: CCJY/coliru
int main()
{
    Something something;
    
    int x= something.work_a();
    
    std::cout << x << std::endl;
    
    return 0;
}
コード例 #3
0
void testAnonymous()
{
#ifndef Q_CC_RVCT
    TestAnonymous a;
    a.i = 1;
    a.i = 2;
    a.i = 3;

    Something s;
    s.foo();
#endif
}
コード例 #4
0
ファイル: main.cpp プロジェクト: CCJY/coliru
int main()
{
    
   Something myThing;
   
   myThing.setThing(
        [&]() {
        	return 1;
        },
        [&]() {
            return 2;
        },
        [&]() {
            return 3;
        }
    );
    
    std::cout << myThing.run();
}
コード例 #5
0
ファイル: main.cpp プロジェクト: njagdale/code-magic
int main()
{
    Something cFirst;
    Something cSecond;
    Something cThird;
   
    std::cout << cFirst.GetID() << std::endl;
    std::cout << cSecond.GetID() << std::endl;
    std::cout << cThird.GetID() << std::endl;
    return 0;
}
コード例 #6
0
ファイル: 8-11.cpp プロジェクト: RubberDog/CPlusPlus
int main()
{
    Something cFirst;
    Something cSecond;
    Something cThird;

    using namespace std;
    cout << cFirst.GetID() << endl;
    cout << cSecond.GetID() << endl;
    cout << cThird.GetID() << endl;
    return 0;
}
コード例 #7
0
ファイル: main.cpp プロジェクト: ganeshredcobra/CPP
int main()
{
    Something something;
    something.setValue1(5);
    std::cout << something.getValue1() << '\n';
};
コード例 #8
0
 int operator+=(Something& t) 
 {
     return total = total + t.GetCount();
 }
コード例 #9
0
ファイル: main.cpp プロジェクト: ganeshredcobra/CPP
int main()
{
    Something some;
    cout << "m_value1 : "<<some.getNum()<< " m_value2 : "<<some.getDen()<< endl;
    return 0;
}