length becomes a static function #565

This commit is contained in:
Christophe Riccio
2016-11-01 08:26:18 +01:00
parent e98ce44d85
commit 9298939816
4 changed files with 18 additions and 9 deletions

View File

@@ -1,7 +1,22 @@
struct vec4
{
static int length();
};
int vec4::length()
{
return 4;
}
int main()
{
int Failed = 0;
vec4 V;
int LengthA = V.length();
int LengthB = vec4::length();
return Failed;
}