mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-17 10:54:55 +02:00
* anytermd: Added anyterm to extras. Included modifications on original anytermd project source code. Added a new spec file for centos/fedora/rhel. Tested on FC16/i386 and centos6/x86_84. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6257 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
32 lines
431 B
C++
32 lines
431 B
C++
#include <iostream>
|
|
|
|
#include "safe_int.hh"
|
|
|
|
#include "Exception.hh"
|
|
|
|
|
|
using namespace std;
|
|
using namespace pbe;
|
|
|
|
typedef safe_int<7> safe_byte;
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
try { try {
|
|
|
|
safe_byte a = 1;
|
|
|
|
for (int i=0; i<1024; ++i) {
|
|
cout << "a = " << a << "\n";
|
|
a = a * static_cast<safe_byte>(3);
|
|
}
|
|
|
|
return 0;
|
|
|
|
} RETHROW_MISC_EXCEPTIONS }
|
|
catch (Exception& E) {
|
|
E.report(cerr);
|
|
}
|
|
}
|
|
|