certi-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[certi-cvs] certi/test/Billard Billard.cc


From: certi-cvs
Subject: [certi-cvs] certi/test/Billard Billard.cc
Date: Mon, 05 May 2008 08:12:18 +0000

CVSROOT:        /sources/certi
Module name:    certi
Changes by:     Eric NOULARD <erk>      08/05/05 08:12:18

Modified files:
        test/Billard   : Billard.cc 

Log message:
        Check-in patch #6497
        from Matteo Boccafoli

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/certi/test/Billard/Billard.cc?cvsroot=certi&r1=3.32&r2=3.33

Patches:
Index: Billard.cc
===================================================================
RCS file: /sources/certi/certi/test/Billard/Billard.cc,v
retrieving revision 3.32
retrieving revision 3.33
diff -u -b -r3.32 -r3.33
--- Billard.cc  30 Apr 2008 13:11:18 -0000      3.32
+++ Billard.cc  5 May 2008 08:12:17 -0000       3.33
@@ -163,12 +163,19 @@
         D.Out(pdInit, "Pause requested for friend");
         try {
             // For testing purpose
-             RTI::FederateHandle numfed ;
+             RTI::FederateHandle numfed(0) ;
              RTI::FederateHandleSet *federateSet = 
RTI::FederateHandleSetFactory::create(1) ;
              cout << "Now we test Register Federation Synchronisation Point on 
some federates" << endl ;
              cout << "Please enter a federate handle (zero means none)" << 
endl ;
              cout << "This federate will be synchronized with the creator and 
not the others" << endl;
-             scanf("%d",&numfed);
+            /* FIXME we should use C++ I/O and not mix C I/O with  C++ I/O  
+             while ( not (std::cin >> numfed) || numfed < 0) {
+                std::cout << "That's not a number; ";
+                    std::cin.clear();
+                    
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
+                    }
+                    */
+             scanf("%lu",&numfed);
              if (numfed != 0)
                  {
                  // We store numfed into the federate set




reply via email to

[Prev in Thread] Current Thread [Next in Thread]