Click here to Skip to main content
15,891,513 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: add char array in specific position in another char array Pin
Luc Pattyn15-Oct-10 6:57
sitebuilderLuc Pattyn15-Oct-10 6:57 
GeneralRe: add char array in specific position in another char array Pin
Richard MacCutchan15-Oct-10 7:11
mveRichard MacCutchan15-Oct-10 7:11 
QuestionReading strings from ID3 tag Pin
Danzy8315-Oct-10 4:09
Danzy8315-Oct-10 4:09 
AnswerRe: Reading strings from ID3 tag [modified] Pin
Code-o-mat15-Oct-10 5:13
Code-o-mat15-Oct-10 5:13 
GeneralRe: Reading strings from ID3 tag Pin
Danzy8315-Oct-10 7:26
Danzy8315-Oct-10 7:26 
GeneralRe: Reading strings from ID3 tag Pin
Code-o-mat15-Oct-10 9:46
Code-o-mat15-Oct-10 9:46 
GeneralRe: Reading strings from ID3 tag Pin
Danzy8315-Oct-10 11:25
Danzy8315-Oct-10 11:25 
GeneralRe: Reading strings from ID3 tag Pin
Code-o-mat15-Oct-10 11:39
Code-o-mat15-Oct-10 11:39 
Based on the Wiki page I thought that in the header all the strings have fixed sizes, can't remember now for the title, e.g. 30 characters. If it contains a shorter string, the rest is padded with zeroes or spaces. So e.g:
[TitleString                   ]

In this case, reading the string till the first space will get you the title correctly, "TitleString", as much as i understand what you did now is "reading" the string until you find a space or a zero. However, if the title is this:
[Title String                  ]

then you will get "Title" only, althorough "String" belonds there too, right? I think what you can do here is checking the very first character, if it is zero or space, the title is not set, if it is not, then read all 30 characters and then trim away the ending spaces if any. Also, in the following case:
[ThisIsALongTitleWithLotsaChars]

then when you are looking for the "ending space/zero", you will just skip over the string and read into whatever comes after it, since no spaces or zeroes are in the string. The specs doesn't say the strings are terminated with anything.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting
in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <

QuestionType Casting Pin
gothic_coder15-Oct-10 1:00
gothic_coder15-Oct-10 1:00 
AnswerRe: Type Casting Pin
Cedric Moonen15-Oct-10 1:02
Cedric Moonen15-Oct-10 1:02 
GeneralRe: Type Casting Pin
gothic_coder15-Oct-10 1:06
gothic_coder15-Oct-10 1:06 
AnswerRe: Type Casting Pin
Sauro Viti15-Oct-10 1:15
professionalSauro Viti15-Oct-10 1:15 
QuestionOne genneral question on dual buffers design with multi-threading Pin
SAMZC14-Oct-10 23:42
SAMZC14-Oct-10 23:42 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
CPallini14-Oct-10 23:49
mveCPallini14-Oct-10 23:49 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
Rajesh R Subramanian15-Oct-10 1:01
professionalRajesh R Subramanian15-Oct-10 1:01 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
CPallini15-Oct-10 2:35
mveCPallini15-Oct-10 2:35 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
Rajesh R Subramanian15-Oct-10 22:10
professionalRajesh R Subramanian15-Oct-10 22:10 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 23:42
SAMZC15-Oct-10 23:42 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
Cedric Moonen14-Oct-10 23:55
Cedric Moonen14-Oct-10 23:55 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 20:37
SAMZC15-Oct-10 20:37 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
Rick York18-Oct-10 7:11
mveRick York18-Oct-10 7:11 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC18-Oct-10 18:22
SAMZC18-Oct-10 18:22 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
Rajesh R Subramanian15-Oct-10 1:05
professionalRajesh R Subramanian15-Oct-10 1:05 
GeneralRe: One genneral question on dual buffers design with multi-threading Pin
SAMZC15-Oct-10 20:53
SAMZC15-Oct-10 20:53 
AnswerRe: One genneral question on dual buffers design with multi-threading Pin
federico.strati15-Oct-10 1:40
federico.strati15-Oct-10 1:40 

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.