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

C / C++ / MFC

 
AnswerRe: problem in send() (Winsock) .. Pin
malaugh18-Jan-07 7:49
malaugh18-Jan-07 7:49 
QuestionVersion Information Pin
Daniel Kanev7-Mar-17 21:54
Daniel Kanev7-Mar-17 21:54 
AnswerRe: Version Information Pin
toxcct17-Jan-07 22:28
toxcct17-Jan-07 22:28 
QuestionUsing OLE automation to call another application Pin
Malcolm Chu17-Jan-07 21:42
Malcolm Chu17-Jan-07 21:42 
QuestionSequence number retrieval. Pin
chks17-Jan-07 20:45
chks17-Jan-07 20:45 
AnswerRe: Sequence number retrieval. Pin
jhwurmbach17-Jan-07 22:16
jhwurmbach17-Jan-07 22:16 
GeneralRe: Sequence number retrieval. Pin
chks17-Jan-07 22:32
chks17-Jan-07 22:32 
GeneralRe: Sequence number retrieval. Pin
jhwurmbach17-Jan-07 22:47
jhwurmbach17-Jan-07 22:47 
chks wrote:
1) as an example there is, ABCDEFGHIJKLMNOPQ
then, from this alphabet, i just need to view DEFG only a record
2) The values are actually the numbers in that sequenced directly.
3) Miscounted, maybe, miswatched such as supposed to be DEFG but CDEF.
4) It seems i'm doing it manually now. perhaps, C is better for newbie like me.


Re: 4) Do you really think that C as opposed to C++, C# or even VisualBasic is the right language to start? Do you have read any beginners literature about C?

So, you got a string consisting of your digits or letters.

In C, that would be a char* (or a wchar_t* if you have Unicode).
You can now use the C-Runtime (short CRT) string manipulation (as described in every C-beginners guide or even in the MSDN) to extract the parts you want.

Here, you could add 3 to the pointer and then use strncpy (or wcsncpy in unicode) to copy the next 4 characters, giving you "DEFG".

About the miscounting, you need to define the rules on which you can determine if there has miscounting occured.
Something like:
"Too short",
"There MUST be a '-' at position 7",
There can only ever be a '0' at position 3".

These rules you can check.

So, go ahead and try!
If you have produced some source you may come back and present it here.

--fixed typos and formatting



"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."

-- Caius Petronius, Roman Consul, 66 A.D.

AnswerRe: Sequence number retrieval. Pin
David Crow18-Jan-07 3:21
David Crow18-Jan-07 3:21 
GeneralRe: Sequence number retrieval. Pin
chks18-Jan-07 21:25
chks18-Jan-07 21:25 
GeneralRe: Sequence number retrieval. Pin
David Crow19-Jan-07 2:28
David Crow19-Jan-07 2:28 
QuestionConverting string to long Pin
vgandhi17-Jan-07 20:39
vgandhi17-Jan-07 20:39 
AnswerRe: Converting string to long Pin
Cedric Moonen17-Jan-07 20:44
Cedric Moonen17-Jan-07 20:44 
GeneralRe: Converting string to long Pin
vgandhi17-Jan-07 20:50
vgandhi17-Jan-07 20:50 
GeneralRe: Converting string to long Pin
Cedric Moonen17-Jan-07 21:01
Cedric Moonen17-Jan-07 21:01 
GeneralRe: Converting string to long Pin
Michael Dunn17-Jan-07 22:17
sitebuilderMichael Dunn17-Jan-07 22:17 
GeneralRe: Converting string to long Pin
vgandhi17-Jan-07 22:26
vgandhi17-Jan-07 22:26 
GeneralRe: Converting string to long Pin
Michael Dunn18-Jan-07 7:52
sitebuilderMichael Dunn18-Jan-07 7:52 
GeneralRe: Converting string to long Pin
David Crow18-Jan-07 3:23
David Crow18-Jan-07 3:23 
GeneralRe: Converting string to long Pin
vgandhi18-Jan-07 6:44
vgandhi18-Jan-07 6:44 
GeneralRe: Converting string to long Pin
David Crow18-Jan-07 7:08
David Crow18-Jan-07 7:08 
Questionon saving WAV file Pin
git crunk17-Jan-07 20:24
git crunk17-Jan-07 20:24 
AnswerRe: on saving WAV file Pin
Cedric Moonen17-Jan-07 20:33
Cedric Moonen17-Jan-07 20:33 
GeneralRe: on saving WAV file Pin
git crunk18-Jan-07 22:09
git crunk18-Jan-07 22:09 
GeneralRe: on saving WAV file Pin
Cedric Moonen19-Jan-07 0:58
Cedric Moonen19-Jan-07 0:58 

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.