Click here to Skip to main content
15,921,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to use friend function? Pin
Alexander M.,23-Jul-03 4:34
Alexander M.,23-Jul-03 4:34 
QuestionHow do I break up a string? Pin
Tom Wright23-Jul-03 3:36
Tom Wright23-Jul-03 3:36 
AnswerRe: How do I break up a string? Pin
keegan23-Jul-03 3:45
keegan23-Jul-03 3:45 
GeneralRe: How do I break up a string? Pin
Tom Wright23-Jul-03 3:56
Tom Wright23-Jul-03 3:56 
GeneralRe: How do I break up a string? Pin
David Crow23-Jul-03 4:03
David Crow23-Jul-03 4:03 
AnswerRe: How do I break up a string? Pin
Alexander M.,23-Jul-03 4:11
Alexander M.,23-Jul-03 4:11 
AnswerRe: How do I break up a string? Pin
LittleYellowBird23-Jul-03 4:27
LittleYellowBird23-Jul-03 4:27 
GeneralRe: How do I break up a string? Pin
Tom Wright23-Jul-03 5:02
Tom Wright23-Jul-03 5:02 
Both ways are very similar to Cobol. For instance (cobol school starting)here is a structure in cobol:

<br />
01  MY-STRING         PIC X(009).<br />
<br />
01  MAIN-STRUCTURE.<br />
    05  FIELD-1       PIC X.<br />
    05  FIELD-2       PIC X(003).<br />
    05  FIELD-3       PIC X.<br />
    05  FIELD-4       PIC 9(003).<br />
    05  FIELD-5       PIC X.<br />

When I reveive a string from a socket connection I can just move that string(MY-STRING)into MAIN-STRUCTURE. Then I can look at each FIELD's to see a break down of the string.

Another way to do it in cobol is like this:
<br />
01  MY-STRING         PIC X(009).<br />
<br />
01  MASTER-STURCTURE.<br />
    05  MAIN-STRUCTURE.<br />
        07  FIELD-1       PIC X.<br />
        07  FIELD-2       PIC X(003).<br />
        07  FIELD-3       PIC X.<br />
        07  FIELD-4       PIC 9(003).<br />
        07  FIELD-5       PIC X.<br />


So can I assume that I can setup a structure in VC++ like this and reference it the same way:

struct sData{
char c1[10];
char c2[20];
char c3[5];
} fields;

Right?

Thanks






Tom Wright
tawright915@yahoo.com
GeneralRe: How do I break up a string? Pin
AlexO23-Jul-03 6:41
AlexO23-Jul-03 6:41 
GeneralRe: How do I break up a string? Pin
LittleYellowBird24-Jul-03 2:19
LittleYellowBird24-Jul-03 2:19 
Generallistctrl with large number of items Pin
pranavamhari23-Jul-03 3:36
pranavamhari23-Jul-03 3:36 
GeneralRe: listctrl with large number of items Pin
Maximilien23-Jul-03 3:46
Maximilien23-Jul-03 3:46 
GeneralRe: listctrl with large number of items Pin
David Crow23-Jul-03 4:13
David Crow23-Jul-03 4:13 
GeneralRe: listctrl with large number of items Pin
pranavamhari23-Jul-03 15:53
pranavamhari23-Jul-03 15:53 
GeneralRe: listctrl with large number of items Pin
David Crow24-Jul-03 2:23
David Crow24-Jul-03 2:23 
GeneralRe: listctrl with large number of items Pin
pranavamhari23-Jul-03 15:51
pranavamhari23-Jul-03 15:51 
GeneralRe: listctrl with large number of items Pin
Alexander M.,23-Jul-03 4:06
Alexander M.,23-Jul-03 4:06 
GeneralIf you really don't wanna use Virtual or Owner draw... Pin
Abin23-Jul-03 16:28
Abin23-Jul-03 16:28 
QuestionListCtrl background color control? Pin
spaced_out23-Jul-03 3:32
spaced_out23-Jul-03 3:32 
AnswerRe: ListCtrl background color control? Pin
Alexander M.,23-Jul-03 4:12
Alexander M.,23-Jul-03 4:12 
GeneralRe: ListCtrl background color control? Pin
spaced_out23-Jul-03 5:04
spaced_out23-Jul-03 5:04 
GeneralPreventing a space in an edit box Pin
keegan23-Jul-03 3:31
keegan23-Jul-03 3:31 
GeneralRe: Preventing a space in an edit box Pin
David Crow23-Jul-03 3:33
David Crow23-Jul-03 3:33 
GeneralRe: Preventing a space in an edit box Pin
valikac23-Jul-03 5:05
valikac23-Jul-03 5:05 
GeneralRe: Preventing a space in an edit box Pin
Ryan Binns23-Jul-03 5:17
Ryan Binns23-Jul-03 5:17 

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.