https://github.com/root-project/root
Raw File
Tip revision: 9a7f39493f9a176d632c939465d69d5d5aac7ba9 authored by Fons Rademakers on 11 February 2014, 17:56:06 UTC
make version v5-34-15.
Tip revision: 9a7f394
t980.cxx
/* -*- C++ -*- */
/*************************************************************************
 * Copyright(c) 1995~2005  Masaharu Goto (root-cint@cern.ch)
 *
 * For the licensing terms see the file COPYING
 *
 ************************************************************************/

#if defined(interp) && defined(makecint)
#pragma include "test.dll"
#else
#include "t980.h"
#endif

#include <cstdio>
#include <cstring>

using namespace std;

int main(int, char**)
{
   A b;
   b = A("A part") + " of a whole";
   A a = A("A part") + " of a whole";
   printf("%s. %s.\n", a.val(), b.val());

   f(a, "A part of a whole");
   f("A part of a whole", a);

   if (!strcmp(a, "A part of a whole")) {
      printf("true\n");
   }
   else {
      printf("false\n");
   }
   if (!strcmp(a, "a part of a whole")) {
      printf("true\n");
   }
   else {
      printf("false\n");
   }

   if (!strcmp(a.val(), "A part of a whole")) {
      printf("true\n");
   }
   else {
      printf("false\n");
   }
   if (!strcmp(a.val(), "a part of a whole")) {
      printf("true\n");
   }
   else {
      printf("false\n");
   }
   return 0;
}

back to top