请问高手们运行这个程序时出现missing function header (old-style formal list?)这个错误怎么解决啊?

失败是妈妈 2004-11-09 10:36:42
#include<iostream.h>
#include<string.h>
//#include<stdio.h>
class date
{
private:
int year;
int month;
int day;
public:
date(int a, int b, int c);
void born(void);
};
class people
{
private:
char name[6];
char sex[2];
date birthday;
public:
people( char*, char*, int, int, int);
void printf(void);
};
date::date(int a,int b,int c)
{ year=a;
month=b;
day=c;
}
void date::born(void)
{
cout<<year<<month<<day;
}
people::people(char* d, char* h,int a,int b,int c);
birthday(int a,int b,int c);
{ strcpy (name,d);
strcpy (sex,h);

}
void people::printf(void)
{
cout<<name;
cout<<sex;
birthday.born();
}
void main()
{
int a,b,c;
char d[6], h[2];
cout<<"姓名";
cin>>d;
cout<<"性别";
cin>>h;
cout<<"年";
cin>>a;
cout<<"month";
cin>>b;
cout<<"day";
cin>>c;

people sl(d,h,a,b,c);
sl.printf();


}
...全文
448 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zxl_llx 2004-11-09
  • 打赏
  • 举报
回复
这么快啊!
fallhunter 2004-11-09
  • 打赏
  • 举报
回复

可以揭帖了~~
fallhunter 2004-11-09
  • 打赏
  • 举报
回复

birthday(a,b,c)是对成员调用构造函数
zxl_llx 2004-11-09
  • 打赏
  • 举报
回复
people::people(char* d, char* h,int a,int b,int c);//<---------改成:
birthday(int a,int b,int c);//<-----------------改成birthday(a,b,c);
{ strcpy (name,d);
strcpy (sex,h);

}
fallhunter 2004-11-09
  • 打赏
  • 举报
回复
people::people(char* d, char* h,int a,int b,int c);
birthday(int a,int b,int c);
{
strcpy (name,d);
strcpy (sex,h);

}
改成:
people::people(char* d, char* h,int a,int b,int c):birthday(a,b,c)
cenlmmx 2004-11-09
  • 打赏
  • 举报
回复
#include<iostream.h>
----------------------
#include<iostream>
using namespace std;
fuzb 2004-11-09
  • 打赏
  • 举报
回复
people::people(char* d, char* h,int a,int b,int c);
birthday(int a,int b,int c);
{
strcpy (name,d);
strcpy (sex,h);

}
你这个写法是错误的吧,我象你是想用d,h,a,b,c这几个参数对name,sex,birthday初始化,应该写成:
people::people(char* d, char* h,int a,int b,int c): //;改成:
birthday(a,b,c) //birthday(int a,int b,int c)改为birthday(a,b,c)
{
strcpy (name,d);
strcpy (sex,h);

}
跟网型逆变器小干扰稳定性分析与控制策略优化研究(Simulink仿真实现)内容概要:本文围绕跟网型逆变器的小干扰稳定性展开分析,重点研究其在电力系统中的动态响应特性及控制策略优化问题。通过构建基于Simulink的仿真模型,对逆变器在不同工况下的小信号稳定性进行建模与分析,识别系统可能存在的振荡风险,并提出相应的控制优化方法以提升系统稳定性和动态性能。研究内容涵盖数学建模、稳定性判据分析、控制器设计与参数优化,并结合仿真验证所提策略的有效性,为新能源并网系统的稳定运行提供理论支持和技术参考。; 适合人群:具备电力电子、自动控制或电力系统相关背景,熟悉Matlab/Simulink仿真工具,从事新能源并网、微电网或电力系统稳定性研究的研究生、科研人员及工程技术人员。; 使用场景及目标:① 分析跟网型逆变器在弱电网条件下的小干扰稳定性问题;② 设计并优化逆变器外环与内环控制器以提升系统阻尼特性;③ 利用Simulink搭建仿真模型验证理论分析与控制策略的有效性;④ 支持科研论文撰写、课题研究或工程项目中的稳定性评估与改进。; 阅读建议:建议读者结合文中提供的Simulink仿真模型,深入理解状态空间建模、特征值分析及控制器设计过程,重点关注控制参数变化对系统极点分布的影响,并通过动手仿真加深对小干扰稳定性机理的认识。

70,037

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧