相关疑难解决方法(0)

错误:跳转到案例标签

我编写了一个涉及使用switch语句的程序......但是在编译时它显示:

错误:跳转到案例标签.

为什么这样做?

#include <iostream>
#include <cstdlib>
#include <fstream>
#include <string>

using namespace std;

class contact
{
public:
    string name;
    int phonenumber;
    string address;
    contact() {
        name= "Noname";
        phonenumber= 0;
        address= "Noaddress";
    }
};

int main() {
    contact *d;
    d = new contact[200];
    string name,add;
    int choice,modchoice,t;//Variable for switch statement
    int phno,phno1;
    int i=0;
    int initsize=0, i1=0;//i is declared as a static int variable
    bool flag=false,flag_no_blank=false;

    //TAKE DATA FROM FILES.....
    //We create 3 files names, phone numbers, Address and then …
Run Code Online (Sandbox Code Playgroud)

c++

209
推荐指数
4
解决办法
23万
查看次数

标签 统计

c++ ×1