mirror of
https://gitlab.com/fbb-git/cppannotations
synced 2024-11-18 10:06:54 +01:00
6881bc3814
Annotations. The branches and tags directory are empty, since I couldn't svnadmin import a repostitory dump. Many earlier versions exist, though, and if you want the full archive, just let me know and I'll send you the svnadmin dump of my full C++ Annotations archive. Frank B. Brokken <f.b.brokken@rug.nl> git-svn-id: https://cppannotations.svn.sourceforge.net/svnroot/cppannotations/trunk@3 f6dd340e-d3f9-0310-b409-bdd246841980
22 lines
449 B
C++
22 lines
449 B
C++
#include <iostream>
|
|
#include <string>
|
|
#include <functional>
|
|
#include <algorithm>
|
|
using namespace std;
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int iArr[] = { 1, -2, 3, -4, 5, -6 };
|
|
|
|
transform(iArr, iArr + 6, iArr, negate<int>());
|
|
|
|
for (int idx = 0; idx < 6; ++idx)
|
|
cout << iArr[idx] << ", ";
|
|
|
|
cout << endl;
|
|
}
|
|
/*
|
|
Generated output:
|
|
|
|
-1, 2, -3, 4, -5, 6,
|
|
*/
|