出错: error C2678: binary '==' : no operator defined which takes a left-hand operand of type???
d:\program files\microsoft visual studio\myprojects\ex15a\student.h(35) : error C2039: 'm_strName' : is not a member of 'CString'
d:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
d:\program files\microsoft visual studio\myprojects\ex15a\student.h(35) : error C2039: 'm_nGrade' : is not a member of 'CString'
d:\program files\microsoft visual studio\vc98\mfc\include\afx.h(368) : see declaration of 'CString'
d:\program files\microsoft visual studio\myprojects\ex15a\student.h(48) : error C2678: binary '==' : no operator defined which takes a left-hand operand of type 'const class CStudent' (or there is no acceptable conversion)
Error executing cl.exe.
相关的程序代码如下:
#ifndef _INSIDE_VISUAL_CPP_STUDENT
#define _INSIDE_VISUAL_CPP_STUDENT
class CStudent : public CObject
{
DECLARE_DYNAMIC(CStudent)
public:
CString m_strName;
int m_nGrade;
CStudent()
{
m_nGrade = 0;
}
CStudent(const char* szName, int nGrade) : m_strName(szName)
{
m_nGrade = nGrade;
}
CStudent(const CStudent& s) : m_strName(s.m_strName)
{
m_nGrade = s.m_nGrade;
}
const CStudent& operator = (const CStudent& s)
{
m_strName = s.m_strName;
m_nGrade = s.m_nGrade;
}
BOOL operator == (const CString& s) const
{
if((m_strName == s.m_strName) && (m_nGrade == s.m_nGrade))
{
return TRUE;
}
else
{
return FALSE;
}
}
BOOL operator != (const CStudent& s) const
{
return !(*this == s);
}
#ifdef _DEBUG
void Dump(CDumpContext& dc) const;
#endif
};
#endif
请指点,谢谢谢谢!!!!!!!!!!!!!!!!!!!!
相关推荐
20种VC++编译错误信息
20种VC++编译错误信息
C/C++ 刷题过程出现的问题汇总
1.error C2679: binary ‘<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char>’ (or there is no acceptable conversio n) 错误代码: string str=” “; cout<<str<<endl; 错误原因: 在#include中string类没有重载“
虚拟网卡驱动源代码(原版)
虚拟网卡驱动源代码(原版): /* * snull.c -- the Simple Network Utility * * Copyright (C) 2001 Alessandro Rubini and Jonathan Corbet * Copyright (C) 2001 O'Reilly & Associates * * The source code in this file can be freely used, adapted, * and redistributed in source or binary form, so long as an * acknowledgment appears in derived source files. The citation * should list that the code comes from the book "Linux Device * Drivers" by Alessandro Rubini and Jonathan Corbet, published * by O'Reilly & Associates. No warranty is attached; * we cannot take responsibility for errors or fitness for use. * * $Id: snull.c,v 1.21 2004/11/05 02:36:03 rubini Exp $ */ #include #include #include #include #include #include /* printk() */ #include /* kmalloc() */ #include /* error codes */ #include /* size_t */ #include /* mark_bh */ #include #include /* struct device, and other headers */ #include /* eth_type_trans */ #include /* struct iphdr */ #include /* struct tcphdr */ #include #include "snull.h" #include #include MODULE_AUTHOR("Alessandro Rubini, Jonathan Corbet"); MODULE_LICENSE("Dual BSD/GPL"); /* * Transmitter lockup simulation, normally disabled. */ static int lockup = 0; module_param(lockup, int, 0); static int timeout = SNULL_TIMEOUT; module_param(timeout, int, 0); /* * Do we run in NAPI mode? */ static int use_napi = 0; module_param(use_napi, int, 0); /* * A structure representing an in-flight packet. */ struct snull_packet { struct snull_packet *next; struct net_device *dev; int datalen; u8 data[ETH_DATA_LEN]; }; int pool_size = 8; module_param(pool_size, int, 0); /* * This structure is private to each device. It is used to
i-vector的工具箱
MSR Identity Toolbox: A Matlab Toolbox for Speaker Recognition Research Version 1.0 Seyed Omid Sadjadi, Malcolm Slaney, and Larry Heck Microsoft Research, Conversational Systems Research Center (CSRC) s.omid.sadjadi@gmail.com, {mslaney,larry.heck}@microsoft.com This report serves as a user manual for the tools available in the Microsoft Research (MSR) Identity Toolbox. This toolbox contains a collection of Matlab tools and routines that can be used for research and development in speaker recognition. It provides researchers with a test bed for developing new front-end and back-end techniques, allowing replicable evaluation of new advancements. It will also help newcomers in the field by lowering the “barrier to entry”, enabling them to quickly build baseline systems for their experiments. Although the focus of this toolbox is on speaker recognition, it can also be used for other speech related applications such as language, dialect and accent identification. In recent years, the design of robust and effective speaker recognition algorithms has attracted significant research effort from academic and commercial institutions. Speaker recognition has evolved substantially over the past 40 years; from discrete vector quantization (VQ) based systems to adapted Gaussian mixture model (GMM) solutions, and more recently to factor analysis based Eigenvoice (i-vector) frameworks. The Identity Toolbox provides tools that implement both the conventional GMM-UBM and state-of-the-art i-vector based speaker recognition strategies. A speaker recognition system includes two primary components: a front-end and a back-end. The front-end transforms acoustic waveforms into more compact and less redundant representations called acoustic features. Cepstral features are most often used for speaker recognition. It is practical to only retain the high signal-to-noise ratio (SNR) regions of the waveform, therefore there is also a need for a speech activity detector (SAD) in the fr
mongodb-linux-x86_64-ubuntu2004-8.0.13.tgz
mongodb-linux-x86_64-ubuntu2004-8.0.13


图形处理/算法
