Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

CString initialization problem

$
0
0

Hi, all, I found a interesting problem when comes to initialize a CString, I tried two blocks of code:

//m_FileName is a CString, declared elsewhere 
// the following line was compiled fine
CString cstrTotFileName = m_FileName + ".dat";

//the following line encountered a error "more than one operator "=" matches these operands"

CString cstrTotFileName;
cstrTotFileName = m_FileName + ".dat";

so what is the best way to concatenate strings.


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>