Click here to Skip to main content
16,006,377 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Large Icon display in Explorer view Pin
BicycleTheif10-Aug-05 20:54
BicycleTheif10-Aug-05 20:54 
GeneralRe: Large Icon display in Explorer view Pin
Nishad S11-Aug-05 0:55
Nishad S11-Aug-05 0:55 
Generalcustom messages in windows forms app. Pin
Member 341989110-Aug-05 19:43
Member 341989110-Aug-05 19:43 
GeneralRe: custom messages in windows forms app. Pin
ThatsAlok10-Aug-05 20:40
ThatsAlok10-Aug-05 20:40 
GeneralRe: custom messages in windows forms app. Pin
S Douglas10-Aug-05 22:55
professionalS Douglas10-Aug-05 22:55 
GeneralHelp with fseek() Pin
Raza568010-Aug-05 19:26
Raza568010-Aug-05 19:26 
GeneralRe: Help with fseek() Pin
El Corazon10-Aug-05 19:59
El Corazon10-Aug-05 19:59 
GeneralRe: Help with fseek() Pin
Jose Lamas Rios10-Aug-05 20:11
Jose Lamas Rios10-Aug-05 20:11 
Raza5680 wrote:
123 67
45 23
76 100


It's hard to compute the correct offset for a given pair, because the numbers aren't padded (or at least don't seem to be in your post) and thus each pair may have a different length. If you control the creation of the file too, you might convert it to something like

123 067
045 023
076 100

With that format, the byte length of each pair can be computed as
int PairLength()
{
   return =   3  // length of first element
            + 1  // separator
            + 3  // length of second element
            + 2; // length of CR/LF
}

Then, the byte offset for pair x (assuming it's a zero-based index) would be
int PairOffset(int x)
{
   return (x-1)*PairLength();
}


--
jlr
http://jlamas.blogspot.com/[^]
GeneralXP System Restore Pin
yqzq10-Aug-05 18:05
yqzq10-Aug-05 18:05 
GeneralRe: XP System Restore Pin
Supriya Tonape23-Aug-05 20:05
Supriya Tonape23-Aug-05 20:05 
GeneralList Subitem Background! Pin
LiYS10-Aug-05 17:59
LiYS10-Aug-05 17:59 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 18:10
Jose Lamas Rios10-Aug-05 18:10 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 18:34
LiYS10-Aug-05 18:34 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 19:54
Jose Lamas Rios10-Aug-05 19:54 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 20:36
LiYS10-Aug-05 20:36 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 20:46
LiYS10-Aug-05 20:46 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 21:17
Jose Lamas Rios10-Aug-05 21:17 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 21:23
LiYS10-Aug-05 21:23 
GeneralRe: List Subitem Background! Pin
Jose Lamas Rios10-Aug-05 21:39
Jose Lamas Rios10-Aug-05 21:39 
GeneralRe: List Subitem Background! Pin
LiYS10-Aug-05 21:43
LiYS10-Aug-05 21:43 
GeneralNewbie need help..! Pin
cue_ball10-Aug-05 16:48
cue_ball10-Aug-05 16:48 
GeneralRe: Newbie need help..! Pin
Christian Graus10-Aug-05 16:53
protectorChristian Graus10-Aug-05 16:53 
GeneralRe: Newbie need help..! Pin
cue_ball10-Aug-05 16:59
cue_ball10-Aug-05 16:59 
GeneralRe: Newbie need help..! Pin
Christian Graus10-Aug-05 17:01
protectorChristian Graus10-Aug-05 17:01 
GeneralRe: Newbie need help..! Pin
cue_ball10-Aug-05 17:05
cue_ball10-Aug-05 17:05 

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.