Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void monitor(int &r);
- ////////////////////////////////////////////////////////////////
- int main()
- {
- int nArr[99] = {22, 2, 4, 6, 7, 5, 3, 5, 61, 83};
- monitor(nArr[1]);
- return 0;
- }
- //////////////////////////////////////////////////////////////
- void monitor(int &r)
- {
- cout << "nArr[1] = " << r << endl;
- int *p = &r;
- p--;
- for(int i = 0; i < 10; i++)
- {
- cout << *(++p) << endl;
- // p++;
- }
- }
- // ( )
- // ( )
- // ( )
- // ( )
- // ) )
- // ( ( /\
- // (_) / \ /\
- // ________[_]________ /\/ \/ \
- // /\ /\ ______ \ / /\/\ /\/\
- // / \ //_\ \ /\ \ /\/\/ \/ \
- // /\ / /\/\ //___\ \__/ \ \/
- // / \ /\/ \//_____\ \ |[]| \
- // /\/\/\/ //_______\ \|__| \
- // / \ /XXXXXXXXXX\ \
- // \ /_I_II I__I_\__________________\
- // I_I| I__I_____[]_|_[]_____I
- // I_II I__I_____[]_|_[]_____I
- // I II__I I XXXXXXX I
- // E-mail: [email protected]
- /*
- #include <stdio.h>
- #include <windows.h>
- int _RGB(unsigned char R, unsigned char G, unsigned char B);
- /////////////////////////////////////////////////////////
- int main()
- {
- int n = _RGB(1, 2, 3);
- printf("n = %d\n", n);
- printf("n = %x\n", n);
- return 0;
- }
- /////////////////////////////////////////////////////////
- int _RGB(unsigned char R, unsigned char G, unsigned char B)
- {
- int nRes = 0;
- nRes = B;
- nRes = nRes << 8; nRes += G;
- nRes = nRes << 8; nRes += R;
- return nRes;
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement