Click here to Skip to main content
15,895,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalpointer of last occurance of word Pin
itkid27-Jul-05 2:36
itkid27-Jul-05 2:36 
GeneralRe: pointer of last occurance of word Pin
David Crow27-Jul-05 2:54
David Crow27-Jul-05 2:54 
GeneralRe: pointer of last occurance of word Pin
Fred96727-Jul-05 3:04
Fred96727-Jul-05 3:04 
GeneralRe: pointer of last occurance of word Pin
David Crow27-Jul-05 3:12
David Crow27-Jul-05 3:12 
GeneralRe: pointer of last occurance of word Pin
itkid18-Nov-05 9:58
itkid18-Nov-05 9:58 
GeneralWindows Server 2003 and ISAPIs Pin
GuimaSun27-Jul-05 2:30
GuimaSun27-Jul-05 2:30 
GeneralBCH Encoder Pin
Abbas_Riazi27-Jul-05 2:00
professionalAbbas_Riazi27-Jul-05 2:00 
GeneralFile Saving Problem, ofstream. Pin
tomek1827-Jul-05 1:22
tomek1827-Jul-05 1:22 
My Code.
<br />
void CChildView::SortData( LPCTSTR pszData)<br />
<br />
TCHAR buffer[10];<br />
_tcsncpy( buffer, pszData, 10);<br />
<br />
//converts UniCodeString to ASCII<br />
char AsciiStr[10];<br />
WideCharToMultiByte (CP_ACP, 0, buffer, -1, AsciiStr, 10, NULL, NULL);<br />
<br />
//Saves to a file<br />
ofstream testFile("test.txt", ios::app);<br />
testFile << AsciiStr;<br />
testFile.close();<br />
<br />


Now sometimes it saves the data into test.txt file correctly, but then at other times it just saves little scares and vertical lines. wich I can't find in the ASCII table. It doesn't matter even if I code testFile << "testing"; still shows the unknown scquares and lines, one for each character.

Now I have tried a number of combinations, such as removing big chunks of code and restarting my pc, even chaning ofstream testFile (" test.txt", ios::out);

D'Oh! | :doh: D'Oh! | :doh: D'Oh! | :doh:
GeneralRe: File Saving Problem, ofstream. Pin
Bob Stanneveld27-Jul-05 1:41
Bob Stanneveld27-Jul-05 1:41 
QuestionDialogBox in a DLL? Pin
Larsson27-Jul-05 1:07
Larsson27-Jul-05 1:07 
AnswerRe: DialogBox in a DLL? Pin
Ray Kinsella27-Jul-05 2:24
Ray Kinsella27-Jul-05 2:24 
GeneralRe: DialogBox in a DLL? Pin
Larsson27-Jul-05 2:48
Larsson27-Jul-05 2:48 
Generalstrangely modeles dialog box working even when i didnt destroy object Pin
sayup27-Jul-05 1:02
sayup27-Jul-05 1:02 
GeneralRe: strangely modeles dialog box working even when i didnt destroy object Pin
Rage27-Jul-05 1:35
professionalRage27-Jul-05 1:35 
GeneralRe: strangely modeles dialog box working even when i didnt destroy object Pin
sayup27-Jul-05 2:27
sayup27-Jul-05 2:27 
GeneralRe: strangely modeles dialog box working even when i didnt destroy object Pin
sayup27-Jul-05 18:56
sayup27-Jul-05 18:56 
GeneralSSL security for website Pin
Sushant Patil27-Jul-05 0:55
Sushant Patil27-Jul-05 0:55 
GeneralCDialogBar and CFrameWnd Pin
Maverick27-Jul-05 0:43
Maverick27-Jul-05 0:43 
GeneralRe: CDialogBar and CFrameWnd Pin
James R. Twine27-Jul-05 3:08
James R. Twine27-Jul-05 3:08 
GeneralFTP Problem Pin
Richard Hudson27-Jul-05 0:06
Richard Hudson27-Jul-05 0:06 
GeneralRe: FTP Problem Pin
mark novak27-Jul-05 1:21
mark novak27-Jul-05 1:21 
GeneralCListCtrl / Select item Pin
P-Rex27-Jul-05 0:03
P-Rex27-Jul-05 0:03 
GeneralRe: CListCtrl / Select item Pin
mark novak27-Jul-05 1:10
mark novak27-Jul-05 1:10 
GeneralRe: CListCtrl / Select item Pin
Marc Soleda27-Jul-05 1:18
Marc Soleda27-Jul-05 1:18 
GeneralRe: command linens error MIDL1004 Pin
Anonymous27-Jul-05 2:57
Anonymous27-Jul-05 2:57 

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.