diff --git a/latex/code/lib/variantvisit.cpp b/latex/code/lib/variantvisit.cpp index 0f834f7..2932b46 100644 --- a/latex/code/lib/variantvisit.cpp +++ b/latex/code/lib/variantvisit.cpp @@ -11,7 +11,7 @@ struct MyVisitor std::cout << "string: " << s << '\n'; } void operator() (long double d) const { - std::cotu << "double: " << d << '\n'; + std::cout << "double: " << d << '\n'; } }; @@ -23,4 +23,4 @@ int main() std::visit(MyVisitor(), var); // 调用string的operator() var = 42.7; std::visit(MyVisitor(), var); // 调用long double的operator() -} \ No newline at end of file +}