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
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
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';
};
 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;
}