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;
  }
}
Exemplo n.º 2
0
Arquivo: main.cpp Projeto: CCJY/coliru
int main()
{
    Something something;
    
    int x= something.work_a();
    
    std::cout << x << std::endl;
    
    return 0;
}
Exemplo n.º 3
0
void testAnonymous()
{
#ifndef Q_CC_RVCT
    TestAnonymous a;
    a.i = 1;
    a.i = 2;
    a.i = 3;

    Something s;
    s.foo();
#endif
}
Exemplo n.º 4
0
Arquivo: main.cpp Projeto: CCJY/coliru
int main()
{
    
   Something myThing;
   
   myThing.setThing(
        [&]() {
        	return 1;
        },
        [&]() {
            return 2;
        },
        [&]() {
            return 3;
        }
    );
    
    std::cout << myThing.run();
}
Exemplo n.º 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;
}
Exemplo n.º 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;
}
Exemplo n.º 7
0
int main()
{
    Something something;
    something.setValue1(5);
    std::cout << something.getValue1() << '\n';
};
 int operator+=(Something& t) 
 {
     return total = total + t.GetCount();
 }
Exemplo n.º 9
0
int main()
{
    Something some;
    cout << "m_value1 : "<<some.getNum()<< " m_value2 : "<<some.getDen()<< endl;
    return 0;
}