Click here to Skip to main content
15,913,361 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 20:46
professionalRage9-Jul-03 20:46 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:28
DaveE9th9-Jul-03 21:28 
GeneralRe: help with IF statement Pin
Ted Ferenc9-Jul-03 21:45
Ted Ferenc9-Jul-03 21:45 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 21:51
professionalRage9-Jul-03 21:51 
GeneralRe: help with IF statement Pin
DaveE9th9-Jul-03 21:54
DaveE9th9-Jul-03 21:54 
GeneralRe: help with IF statement Pin
Rage9-Jul-03 23:01
professionalRage9-Jul-03 23:01 
GeneralRe: help with IF statement Pin
DaveE9th10-Jul-03 7:26
DaveE9th10-Jul-03 7:26 
GeneralThe UINT range problem in MFC. Pin
Kevein9-Jul-03 17:54
Kevein9-Jul-03 17:54 
GeneralRe: The UINT range problem in MFC. Pin
Neville Franks9-Jul-03 18:04
Neville Franks9-Jul-03 18:04 
GeneralRe: The UINT range problem in MFC. Pin
Kevein13-Jul-03 15:20
Kevein13-Jul-03 15:20 
GeneralAuto Device Driver Installation.. Pin
Member 4048139-Jul-03 15:25
Member 4048139-Jul-03 15:25 
GeneralRe: Auto Device Driver Installation.. Pin
IceMatrix10-Jul-03 8:50
IceMatrix10-Jul-03 8:50 
GeneralThread Programming & Matlab Pin
samr679-Jul-03 14:50
samr679-Jul-03 14:50 
GeneralRe: Thread Programming & Matlab Pin
Abbas_Riazi9-Jul-03 18:17
professionalAbbas_Riazi9-Jul-03 18:17 
GeneralRe: Thread Programming & Matlab Pin
samr679-Jul-03 19:08
samr679-Jul-03 19:08 
GeneralRe: Thread Programming & Matlab Pin
kochhar10-Jul-03 14:32
kochhar10-Jul-03 14:32 
Questionfwrite error??? Pin
will13839-Jul-03 11:15
will13839-Jul-03 11:15 
AnswerRe: fwrite error??? Pin
Led9-Jul-03 11:23
Led9-Jul-03 11:23 
GeneralRe: fwrite error??? Pin
will13839-Jul-03 11:26
will13839-Jul-03 11:26 
GeneralRe: fwrite error??? Pin
will13839-Jul-03 11:32
will13839-Jul-03 11:32 
GeneralRe: fwrite error??? Pin
Neville Franks9-Jul-03 12:14
Neville Franks9-Jul-03 12:14 
AnswerRe: fwrite error??? Pin
Mustafa Demirhan9-Jul-03 12:54
Mustafa Demirhan9-Jul-03 12:54 
GeneralFinally! Pin
will138310-Jul-03 1:14
will138310-Jul-03 1:14 
GeneralConfused in abby Pin
PJ Arends9-Jul-03 11:03
professionalPJ Arends9-Jul-03 11:03 
Dear Forum,

Ok, this is really starting to bug me. Anybody have any idea why the 'TableName' is not being added to the string 'str', even though the 'TableName' seems to be valid as the watch window shows the correct value and the TRACE call does manage to successfully out put it?

for (std::vector<DFields *>::iterator it = pConfig->Samples.begin(); it != pConfig->Samples.end(); ++it)
{
    CString str = _T("");
    if (pConfig->IncludeComputer)
    {
        str += (*it)->ComputerName;
        str += _T(" : ");
    }
 
    if (pConfig->IncludeTable)
    {
        TRACE("*%s*\n", (*it)->TableName); // TableName successfully TRACEd
        str += (*it)->TableName;           // Why TableName not added to string????
        str += _T(" : ");
    }
 
    str += (*it)->SampleName;
 
    m_ListSelected.AddString(str);
}


After this function, 'str' is (sans quotes): "Barn 1 Feed : : Total Daily Feed"

and the TRACE output is: "*743 Daily*".

str should be: "Barn 1 Feed : 743 Daily : Total Daily Feed"

I have tried to do a rebuild all, exit dev studio and then rebuild all, even rebooted my computer. But still no luck. All I know is that I will probably see what I am doing wrong as soon as I hit the submit buttonUnsure | :~

[edit]
ComputerName, Tablename, and SampleName are all CStrings.
[/edit]

Signed
Confused in abby







Sonork 100.11743 Chicken Little

"You're obviously a superstar." - Christian Graus about me - 12 Feb '03

Within you lies the power for good - Use it!
GeneralRe: Confused in abby Pin
Led9-Jul-03 11:26
Led9-Jul-03 11:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.