簡體   English   中英

我不明白的代碼中的非 ascii 字符到底在哪里?

[英]where exactly are the non ascii characters in my code i don't understand?

我的英語不好對不起我的錯誤。 我正在為極客解決這個問題,這是我得到的警告。 我不明白是什么原因造成的,你能幫我嗎? 問題: https://www.hackerrank.com/challenges/virtual-functions/problem?isFullScreen=true

我的代碼:

class Person{
    protected:
        string name;
        int age;
        int id;
        
    public:
        Person(){
            name="";
            age=0;
            id=0;
        }
        ~Person();
        virtual void getdata()=0; 
        virtual void putdata()=0;
    
};

class Professor: public Person{
    private:
        int publications;
        static int cur_id;
        
    public:
        Professor(){
            id=cur_id;
            cur_id++;
        }
        ~Professor();
        void getdata(){
       
        }

        void putdata(){

        }
    
    
};

class Student: public Person{
    private:
       int *marks;
       static int cur_id;
       
    public:
        Student(){
            id=cur_id;
            cur_id++;
            marks = new int[6];
        }
        
        void getdata(){

        }
        
        void putdata(){
      
        }
    
};

警告:您的提交包含非 ASCII 字符,我們不接受此挑戰的非 ASCII 字符提交。

請參閱此https://ide.geeksforgeeks.org/tkelioD7Fh header 文件中的問題或使用命名空間 std。 如果使用發布整個代碼(URL)會很有幫助

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM