René's URL Explorer Experiment


Title: `main` 函数和命令行参数 (C++) | Microsoft Learn

Open Graph Title: `main` 函数和命令行参数 (C++)

Description: `main` 函数是 C++ 程序的入口点。

Open Graph Description: `main` 函数是 C++ 程序的入口点。

Opengraph URL: https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args?view=msvc-170

X: @MicrosoftLearn

direct link

Domain: learn.microsoft.com

color-schemelight dark
twitter:cardsummary_large_image
og:typewebsite
og:image:altMicrosoft Learn
og:imagehttps://learn.microsoft.com/en-us/media/open-graph-image.png
platform_idf91017dc-d7f8-a55b-a696-4ed862e21988
scopeC++
localezh-cn
uhfHeaderIdMSDocsHeader-CPP
page_typeconceptual
schemaConceptual
audiencedeveloper
authorTylerMSFT
breadcrumb_path../_breadcrumb/toc.json
default_monikermsvc-170
depot_nameVS.vcppdocs
document_ide0c5ec8f-dc90-d0bd-5aa5-1340ccc877c3
document_version_independent_id19646aca-3da3-14e8-ea9a-fcb3020cf51c
feedback_help_link_typeget-help-at-qna
feedback_help_link_urlhttps://learn.microsoft.com/en-us/answers/tags/314/cpp
feedback_product_urlhttps://developercommunity.visualstudio.com/cpp/
feedback_systemStandard
git_commit_idcf14bbcf24ff9ea71908a64a93c69c737ec7a42b
gitcommithttps://github.com/MicrosoftDocs/cpp-docs-pr/blob/cf14bbcf24ff9ea71908a64a93c69c737ec7a42b/docs/cpp/main-function-command-line-args.md
managercoxford
monikersmsvc-180
ms.authortwhitney
ms.date2020-12-16T00:00:00Z
ms.servicevisual-cpp
ms.subservicecpp-lang
ms.tgt_pltfrmWindows
ms.topiclanguage-reference
ms.update-cycle1095-days
ms.workloadcplusplus
original_content_git_urlhttps://github.com/MicrosoftDocs/cpp-docs-pr/blob/live/docs/cpp/main-function-command-line-args.md
ROBOTSINDEX,FOLLOW
site_nameDocs
updated_at2025-11-07T02:10:00Z
ms.translationtypeMT
ms.contentlocalezh-cn
loc_version2025-08-01T05:10:13.1327218Z
loc_source_idGithub-70020392#live
loc_file_idGithub-70020392.live.VS.vcppdocs.cpp/main-function-command-line-args.md
toc_reltoc.json
search.mshattr.devlangcpp
word_count2419
asset_idcpp/main-function-command-line-args
item_typeContent
previous_tlsh_hash53D987E1D8332578A7F8013E38FFE164B74A131F8DB22DC73CC4D389305DD932CA64B61A2A9D425849EB019361EDB76385783161A7F693EFC2124BA0CEA55DA5043E951EAD
github_feedback_content_git_urlhttps://github.com/MicrosoftDocs/cpp-docs/blob/main/docs/cpp/main-function-command-line-args.md
markdown_urlhttps://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args?view=msvc-170&accept=text/markdown

Links:

跳至主要内容 https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args#main
跳到 Ask Learn 聊天体验 https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args
下载 Microsoft Edge https://go.microsoft.com/fwlink/p/?LinkID=2092881
有关 Internet Explorer 和 Microsoft Edge 的详细信息 https://learn.microsoft.com/en-us/lifecycle/faq/internet-explorer-microsoft-edge
使用英语阅读 https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args
登录https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args
函数重载https://learn.microsoft.com/zh-cn/cpp/cpp/function-overloading?view=msvc-170
自定义 C++ 命令行处理https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args#customize
CreateProcesshttps://learn.microsoft.com/zh-cn/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessw
GetModuleFileNamehttps://learn.microsoft.com/zh-cn/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamew
使用一般文本映射https://learn.microsoft.com/zh-cn/cpp/c-runtime-library/using-generic-text-mappings?view=msvc-170
returnhttps://learn.microsoft.com/zh-cn/cpp/cpp/program-termination?view=msvc-170
exithttps://learn.microsoft.com/zh-cn/cpp/cpp/program-termination?view=msvc-170
自定义 C++ 命令行处理https://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args#customize
链接选项https://learn.microsoft.com/zh-cn/cpp/c-runtime-library/link-options?view=msvc-170
基本概念https://learn.microsoft.com/zh-cn/cpp/cpp/basic-concepts-cpp?view=msvc-170
zh-cnhttps://learn.microsoft.com/zh-cn/cpp/cpp/main-function-command-line-args
你的隐私选择https://aka.ms/yourcaliforniaprivacychoices
AI 免责声明https://learn.microsoft.com/zh-cn/principles-for-ai-generated-content
早期版本https://learn.microsoft.com/zh-cn/previous-versions/
博客https://techcommunity.microsoft.com/t5/microsoft-learn-blog/bg-p/MicrosoftLearnBlog
参与https://learn.microsoft.com/zh-cn/contribute
隐私https://go.microsoft.com/fwlink/?LinkId=521839
消费者健康隐私https://go.microsoft.com/fwlink/?linkid=2259814
使用条款https://learn.microsoft.com/zh-cn/legal/termsofuse
商标https://www.microsoft.com/legal/intellectualproperty/Trademarks/

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.