Click to See Complete Forum and Search --> : easy one
Stevo11
October 11th, 1999, 06:38 AM
I'm getting little blocks when I write \n or \r to a text file, I've fixed this before, but can't remember how! Anyhelp? BTW, I'm copying the string "hello \n\r" from a
CString
to a
char cBuf[100]
using strcpy
Cheers
Steve
Tufail Khan
October 11th, 1999, 06:46 AM
Hello,
use memcpy() instead of strcpy()
cheers,
Tufail Khan
Stevo11
October 11th, 1999, 07:14 AM
would using .AnsiToOem() help?
Tufail Khan
October 11th, 1999, 07:31 AM
friend ! could not get ur question? whats problem using .AnsiToOem().
Its purpose is to convert all the characters in this CString object from the ANSI character set to the OEM character set.
what else do u want to know?
Tufail Khan
Roger Allen
October 11th, 1999, 09:14 AM
Your problem might be you are doing new line then line feed, when you should be doing line feed then new line return. Swap the /n/r to /r/n.
Notepas and text processors expect the pair of characters in a certain order, if they don't get them in that order you get the little black squares.
HTH
Roger Allen aka [CB]RIGamortis, the quake2 player.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.