Click here to Skip to main content
15,890,370 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Confused in abby Pin
PJ Arends9-Jul-03 11:32
professionalPJ Arends9-Jul-03 11:32 
GeneralRe: Confused in abby Pin
Neville Franks9-Jul-03 12:11
Neville Franks9-Jul-03 12:11 
GeneralProject Converter Pin
308holes9-Jul-03 10:56
308holes9-Jul-03 10:56 
GeneralRe: Project Converter Pin
Mustafa Demirhan9-Jul-03 12:44
Mustafa Demirhan9-Jul-03 12:44 
QuestionHow to keep rendering during user-input Pin
Led9-Jul-03 10:38
Led9-Jul-03 10:38 
AnswerRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 12:17
Neville Franks9-Jul-03 12:17 
GeneralRe: How to keep rendering during user-input Pin
Led9-Jul-03 12:51
Led9-Jul-03 12:51 
GeneralRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 13:08
Neville Franks9-Jul-03 13:08 
GeneralRe: How to keep rendering during user-input Pin
Led9-Jul-03 13:40
Led9-Jul-03 13:40 
GeneralRe: How to keep rendering during user-input Pin
Led9-Jul-03 13:51
Led9-Jul-03 13:51 
GeneralRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 15:35
Neville Franks9-Jul-03 15:35 
GeneralRe: How to keep rendering during user-input Pin
Ryan Binns9-Jul-03 17:05
Ryan Binns9-Jul-03 17:05 
GeneralRe: How to keep rendering during user-input Pin
Neville Franks9-Jul-03 18:01
Neville Franks9-Jul-03 18:01 
GeneralModeless dialog with Child style Pin
DionChen9-Jul-03 10:04
DionChen9-Jul-03 10:04 
GeneralRe: Modeless dialog with Child style Pin
Toni789-Jul-03 13:04
Toni789-Jul-03 13:04 
GeneralPrinting PDF SDK Pin
OBRon9-Jul-03 9:39
OBRon9-Jul-03 9:39 

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.