Reputation: 9
my english is not good sorry for my mistakes. I was solving this problem for geeks for geeks and this is the warning I got. I don't understand what's causing it, can you help me? problem: https://www.hackerrank.com/challenges/virtual-functions/problem?isFullScreen=true
my code:
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(){
}
};
warning: Your submission contains non ASCII characters, we don't accept submissions with non ASCII charaters for this challenge.
Upvotes: 1
Views: 6716
Reputation: 11
See this https://ide.geeksforgeeks.org/tkelioD7Fh Either issue in header file or using namespace std. It will be helpful if use post entire code (URL)
Upvotes: 1