error C2039: 'strcpy' : is not a member of '`global namespace'' 这问题怎么解决?下面是程序。 5
#include"student.h"#include"filem.h"student::student(){number=0;::strcpy(name,"学生姓名")...
#include "student.h"
#include "filem.h"
student::student()
{
number=0;
::strcpy(name,"学生姓名");
score=0;
::strcpy(kecname,"课程名称");
::strcpy(yuanxi,"所在院系");
age=0;
::strcpy(addr,"学生家庭住址");
::strcpy(password,"学生登录密码");
}
void student::seemy(int number)
{
char filepath[30];
::strcpy(filepath,"学生情况.txt");
filem fm;
fm.readfile (filepath,number);
}
void student::checkkec(int number)
{
char filepath[30];
::strcpy(filepath,"学生所选课程情况.txt");
filem fm;
fm.readfile(filepath,number);
}
void student::seletekec(int number)
{
char filepath[30];
::strcpy(filepath,"课程列表.txt");
filem fm;
fm.readfile(filepath,number);
}
void student::checkscoure(int number)
{
char filepath[30];
::strcpy(filepath,"学生课程成绩.txt");
filem fm;
fm.readfile(filepath,number);
} 展开
#include "filem.h"
student::student()
{
number=0;
::strcpy(name,"学生姓名");
score=0;
::strcpy(kecname,"课程名称");
::strcpy(yuanxi,"所在院系");
age=0;
::strcpy(addr,"学生家庭住址");
::strcpy(password,"学生登录密码");
}
void student::seemy(int number)
{
char filepath[30];
::strcpy(filepath,"学生情况.txt");
filem fm;
fm.readfile (filepath,number);
}
void student::checkkec(int number)
{
char filepath[30];
::strcpy(filepath,"学生所选课程情况.txt");
filem fm;
fm.readfile(filepath,number);
}
void student::seletekec(int number)
{
char filepath[30];
::strcpy(filepath,"课程列表.txt");
filem fm;
fm.readfile(filepath,number);
}
void student::checkscoure(int number)
{
char filepath[30];
::strcpy(filepath,"学生课程成绩.txt");
filem fm;
fm.readfile(filepath,number);
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询