Explorar o código

examples: Add note about negative indexes when using Apply

Ole Krüger %!s(int64=10) %!d(string=hai) anos
pai
achega
d4425f1c80
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/stack.cpp

+ 1 - 1
examples/stack.cpp

@@ -26,7 +26,7 @@ int main() {
 
 	// ... which is a little cumbersome. Instead we might apply a fitting function to our stack.
 	std::cout << "(a + b) * c = "
-	          << Apply(state, sum3)
+	          << Apply(state, sum3) // Equivalent to Apply(state, 1, sum3) or Apply(state, -3, sum3)
 	          << std::endl;
 
 	lua_close(state);