update
Former-commit-id: bdede6ed1b6f578f2ef046c338caf02d0b29d453 [formerly 7187de361b53e9c8ec121df379b762f2db736ea2] Former-commit-id: 447d58460fbbfd05ffe08428a1288e392637561d
This commit is contained in:
46
_embed/public/ace/demo/kitchen-sink/docs/c_cpp.cpp
Normal file
46
_embed/public/ace/demo/kitchen-sink/docs/c_cpp.cpp
Normal file
@@ -0,0 +1,46 @@
|
||||
// compound assignment operators
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include \
|
||||
<iostream>
|
||||
|
||||
#include \
|
||||
\
|
||||
<iostream>
|
||||
|
||||
#include \
|
||||
\
|
||||
"iostream"
|
||||
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include "boost/asio/io_service.hpp"
|
||||
|
||||
#include \
|
||||
\
|
||||
"iostream" \
|
||||
"string" \
|
||||
<vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//
|
||||
int main ()
|
||||
{
|
||||
int a, b=3; /* foobar */
|
||||
a = b; // single line comment\
|
||||
continued
|
||||
a+=2; // equivalent to a=a+2
|
||||
cout << a;
|
||||
#if VERBOSE >= 2
|
||||
prints("trace message\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Print an error message and get out */
|
||||
#define ABORT \
|
||||
do { \
|
||||
print( "Abort\n" ); \
|
||||
exit(8); \
|
||||
} while (0) /* Note: No semicolon */
|
||||
Reference in New Issue
Block a user