C++问题 急求!!!!!!

Deleting intermediate files and output files for project '1 - Win32 Debug'.
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
1.cpp
F:\1\1.cpp(29) : error C2511: 'Tel::Tel' : overloaded member function 'void (int,char [],char [],int,int,int)' not found in 'Tel'
F:\1\1.cpp(8) : see declaration of 'Tel'
F:\1\1.cpp(60) : error C2511: 'SetD' : overloaded member function 'void (int,char [],char [],int,int,int)' not found in 'Tel'
F:\1\1.cpp(8) : see declaration of 'Tel'
F:\1\1.cpp(121) : error C2601: 'Indata' : local function definitions are illegal
F:\1\1.cpp(141) : error C2601: 'Modify' : local function definitions are illegal
F:\1\1.cpp(185) : error C2601: 'Delete' : local function definitions are illegal
F:\1\1.cpp(225) : error C2601: 'RearchN' : local function definitions are illegal
F:\1\1.cpp(263) : error C2601: 'RearchT' : local function definitions are illegal
F:\1\1.cpp(307) : error C2601: 'RearchU' : local function definitions are illegal
F:\1\1.cpp(350) : error C2601: 'caozuo' : local function definitions are illegal
F:\1\1.cpp(366) : error C2601: 'main' : local function definitions are illegal
F:\1\1.cpp(389) : fatal error C1004: unexpected end of file found
执行 cl.exe 时出错.
#include "stdafx.h"
#include<iostream.h>
#include<fstream.h>
#include<string.h>
#include<iomanip.h>
class Tel
{public:
Tel();
Tel(int x,char n[20],char u[20],int te,int m,float q);
~Tel();
void Set();
void SetD(int x,char n[], char u[], int te, int m,float q);
int CmpN(char *);
int CmpU(char *);
int CmpT(int t);
void Disp();
private:
char name[20];
char unit[20];
int number,telphone,minute,qian;
};
Tel::Tel(){}
Tel::Tel(int x,char n[20],char u[20],int te,int m,float q)
{strcpy(name, n);
strcpy(unit, u);
number=x;
telphone=te;
minute=m;
qian=q;
}
Tel::~Tel(){}
Tel temp,*ps=&temp;
char name[20];
char unit[20];
int number,telphone,minute,qian;
char filename[]="e:\\txl\\txl.dat";
void Tel::Set()
{cout<<"输入以下数据:\n序号:";
cin>>number;
cout<<"姓名:";
cin>>name;
cout<<"单位:";
cin>>unit;
cout<<"电话号码:";
cin>>telphone;
cout<<"时间:";
cin>>minute;
cout<<"话费:";
cin>>qian;
}

第1个回答  2012-06-21
遇到这种问题贴代码
第2个回答  2012-06-21
“fatal error C1004: unexpected end of file found“出现这一句应该是你的代码里面哪里少了一个花括号了,找找看,加上去问题应该就能解决了。
第3个回答  2012-06-21
函数的定义不合法,看看是不是出现函数的嵌套等问题!你应该把原代码复制过来,我们才能好好的为你解答阿。。追问

你等等~~这个程序不能完全贴上来

相似回答