VSCODE 编译程序出现multiple definition of `main‘

VS code 程序编译出现错误 multiple definition of `main’

#include <iostream>
#include <stdio.h>
#include <stdlib.h>

using namespace std;

int main()
{
    printf("----------------------------\r\n");
    cout<<"ccccccccccccccccccccccc"<<endl;
    printf("-----------------------------\r\n");
    getchar();
    return 1;
}


报错如下图:

在这里插入图片描述

main方法重定义的原因:

task.json文件中添加两次,导致重定义

解决方法:删除其中一个就可以了

 {
    "tasks": [
        {
            "type": "shell",
            "label": "C/C++: g++.exe 生成活动文件",
            "command": "D:\\Program Files\\mingw64\\bin\\g++.exe",
            "args": [
                "-g",//"${file},  删掉此行""${fileDirname}\\*.cpp",`
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe",
                "-lwsock32"
            ],
            "options": {
                "cwd": "${fileDirname}"
            },
            "problemMatcher": [
                "$gcc"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            },
            "detail": "调试器生成的任务。"
        }
    ],
    "version": "2.0.0"
}
  • 12
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Driven by the rapid escalation of the wireless capacity requirements imposed by advanced multimedia applications (e.g., ultra-high-definition video, virtual reality etc.), as well as the dramatically increasing demand for user access required for the Internet of Things (IoT), the fifth generation (5G) networks face challenges in terms of supporting large-scale heterogeneous data traffic. Non-orthogonal multiple access (NOMA), which has been recently proposed for the 3rd generation partnership projects long-term evolution advanced (3GPP-LTE-A), constitutes a promising technology of addressing the above-mentioned challenges in 5G networks by accommodating several users within the same orthogonal resource block. By doing so, significant bandwidth efficiency enhancement can be attained over conventional orthogonal multiple access (OMA) techniques. This motivated numerous researchers to dedicate substantial research contributions to this field. In this context, we provide a comprehensive overview of the state-of-the-art in power-domain multiplexing aided NOMA, with a focus on the theoretical NOMA principles, multiple antenna aided NOMA design, on the interplay between NOMA and cooperative transmission, on the resource control of NOMA, on the co-existence of NOMA with other emerging potential 5G techniques and on the comparison with other NOMA variants. We highlight the main advantages of power-domain multiplexing NOMA compared to other existing NOMA techniques. We summarize the challenges of existing research contributions of NOMA and provide potential solutions. Finally, we offer some design guidelines for NOMA systems and identify promising research opportunities for the future.
Systems Modeling Language (OMG SysML™) 1.6.pdf The purpose of this International Standard is to specify the Systems Modeling Language (SysML), a general-purpose modeling language for systems engineering. Its intent is to specify the language so that systems engineering modelers may learn to apply and use SysML; modeling tool vendors may implement and support SysML; and both can provide feedback to improve future versions. Note that a definition of “system” and “systems engineering” can be found inISO/ IEC 15288. SysML reuses a subset of UML 2.5 and provides additional extensions to address the requirements in UML for SE. SysML uses the UML 2.5 extension mechanisms as further elaborated in Clause 17 as the primary mechanism to specify the extensions to UML 2.5. This revision of SysML relies on several new features incorporated into UML 2.5. Any use of the term “UML 2” or “UML” in this specification, unless otherwise noted, will refer to UML 2.5 in general and the UML 2.5 specification in particular. Since SysML uses UML 2.5 as its foundation, systems engineers modeling with SysML and software engineers modeling with UML 2.5 will be able to collaborate on models of software-intensive systems. This will improve communication among the various stakeholders who participate in the systems development process and promote interoperability among modeling tools. It is anticipated that SysML will be customized to model domain-specific applications, such as automotive, aerospace, communication, and information systems. SysML is designed to provide simple but powerful constructs for modeling a wide range of systems engineering problems. It is particularly effective in specifying requirements, structure, behavior, allocations, and constraints on system properties to support engineering analysis. The language is intended to support multiple processes and methods such as structured, object-oriented, and others, but each methodology may impose additional constraints

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值