Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- //using namespace std;
- class YY
- {
- public:
- int old;
- char szName[123];
- void foo(int);
- } yy[12], yy1;
- ////////////////////////////////////////////////////
- int main() //
- {
- int n = 9;
- yy[5].old = 27;
- strcpy(yy[5].szName, "Oleg");
- yy[5].foo(3);
- printf("Name is %s \n", yy[5].szName);
- printf("Old = %d \n", yy[5].old);
- return 0;
- }
- void YY::foo(int n)
- {
- old = old - n;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement