搞不清楚哪一步骤编译出错,该如何解决(语言-c++)

问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
friend istream& operator >> (istream& in , PetDog<1,2,3,4,5.>& p){
    cout<<"[写入宠物信息]"<<endl;
    cout<<"序号:"<<endl;
    cin>>p.num;
    cout<<"种类:"<<endl;
    cin>>p.type;
    cout<<"年龄(岁)"<<endl;
    cin>>p.age;
    cout<<"体重(kg)"<<endl;
    cin>>p.weight;
    cout<<"状态(1为健康,2为生病):"<<endl;
    cin>>p.state;
    return in; 
} 

第二种有错误
friend istream& operator >> (istream& in , PetDog<1,2,3,4,5.>& p){
cout<<"[写入宠物信息]"<<endl;
cout<<"序号:"<<endl;
cin>>p.num;
cout<<"种类:"<<endl;
cin>>p.type;
cout<<"年龄(岁)"<<endl;
cin>>p.age;
cout<<"体重(kg)"<<endl;
cin>>p.weight;
cout<<"状态(1为健康,2为生病):"<<endl;
cin>>p.state;
return in;

运行结果及报错内容

第一种报错
33 45 D:\程序\Devc++\宠物医院管理系统.cpp [Error] 'PetDog' has not been declared
33 51 D:\程序\Devc++\宠物医院管理系统.cpp [Error] expected ',' or '...' before '<' token
第二种报错
36 8 D:\程序\Devc++\宠物医院管理系统.cpp [Error] 'p' was not declared in this scope

我的解答思路和尝试过的方法
我想要达到的结果

两种啥区别啊。参数有in,你还用cin输入啊

PetDog<1,2,3,4,5.> 这是啥代码 PetDog是怎么声明的