直接运行和调试都出现以下问题:请高手解答一下?
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
First-chance exception in STL.exe (KERNEL32.DLL): 0xE06D7363: Microsoft C++ Exception.
读文件时的目标文件是emp.txt.
////////////////////////////////////////////////////////////////////
源程序如下:
#include <string>
#include <fstream>
#include <iostream>
using namespace std;
int M_count=0;//统计女职工数目
int F_count=0;//统计男职工数目
class Emp
{
public:
string num;
string firstName;
string lastName;
string area;
string y_m_d;
string h_m_s;
public:
void Display();
string getSex();
};
void Emp::Display()
{
cout<<num<<" "<<firstName<<" "<<lastName<<" "<<area<<" "
<<y_m_d<<" "<<h_m_s<<endl;
}
string Emp::getSex()
{
return num.substr(8,1);
}
void main()
{
Emp employee;
ifstream is("emp.txt",ios::in);
is>>employee.num>>employee.firstName>>employee.lastName>>employee.area>>employee.y_m_d;
char ch;
while((ch=is.get()) && ch!=EOF)
{
is>>employee.num>>employee.firstName>>employee.lastName>>employee.area
>>employee.y_m_d>>employee.h_m_s;
if("M"==employee.getSex())
M_count++;
else
F_count++;
}
cout<<"男职工数目为:"<<M_count<<" "<<"女职工数目为:"<<F_count<<endl;
}
在线等,请那位高手指点一下!
[此贴子已经被作者于2007-7-21 10:16:32编辑过]