瀏覽代碼

examples: Add note about negative indexes when using Apply

Ole Krüger 10 年之前
父節點
當前提交
d4425f1c80
共有 1 個文件被更改,包括 1 次插入1 次删除
  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);