Created
August 5, 2009 23:30
-
-
Save dmishe/163042 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
struct test { | |
int a; | |
int a_square(); | |
}; | |
int test::a_square() | |
{ | |
return a*a; | |
} | |
int main() | |
{ | |
struct test A; | |
A.a = 123; | |
std::cout << A.a << std::endl; | |
std::cout << A.a_square() << std::endl; | |
getchar(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment