Click here to Skip to main content
15,919,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CSocket Progaramming in MFC Pin
mbcvamsidhar18-Jul-05 3:54
mbcvamsidhar18-Jul-05 3:54 
Generaldynamic struct arrays Pin
Anonymous16-Jul-05 21:12
Anonymous16-Jul-05 21:12 
GeneralRe: dynamic struct arrays Pin
M.Mehrdad.M16-Jul-05 21:37
M.Mehrdad.M16-Jul-05 21:37 
GeneralRe: dynamic struct arrays Pin
Anonymous16-Jul-05 22:27
Anonymous16-Jul-05 22:27 
GeneralRe: dynamic struct arrays Pin
David Crow18-Jul-05 3:04
David Crow18-Jul-05 3:04 
GeneralRe: dynamic struct arrays Pin
PJ Arends16-Jul-05 21:39
professionalPJ Arends16-Jul-05 21:39 
GeneralRe: dynamic struct arrays Pin
toxcct17-Jul-05 21:00
toxcct17-Jul-05 21:00 
GeneralRe: dynamic struct arrays Pin
Anonymous17-Jul-05 1:16
Anonymous17-Jul-05 1:16 
Yes it is. However, you need a totally new approach for this. Use a linked list. make a struct for the node like so:

struct node
{
<any datatype=""> variable;
.
.
.
struct node *Link;
};

now make a struct for the linked list like so


struct list
{
node *First //first node in the list.
void InsertNode(node *temp) //inserting at end of list, or anywhwere u like
};

the first node will point to the next node, it will intern point to the next and so on. u can now use malloc to dynamically allocate mem for each node and append them at the end of the chain. remember to always keep the Link of teh last node in the chain as NULL. this is the end of the list. Please see more info on linked lists. There is too much out there for me to explain here, but this is the general format of a SINGLY LINKED LIST, but there many types.

hope this has helped. you can change the functions in the list struct as per your requirements. you may add function for deleting, etc. You cannot create a dynamica array and maintain the data in it at the same time, unless you are using vb, where you can actually do this by ReDim.

I hope i have answered your questionSmile | :) )
GeneralRe: dynamic struct arrays Pin
Archer28217-Jul-05 12:34
Archer28217-Jul-05 12:34 
GeneralRe: dynamic struct arrays Pin
S Douglas17-Jul-05 22:47
professionalS Douglas17-Jul-05 22:47 
QuestionHow to call IDL's routine using VC? Pin
dfwang200016-Jul-05 21:06
dfwang200016-Jul-05 21:06 
GeneralTemplate Pin
Alex_Y16-Jul-05 14:30
Alex_Y16-Jul-05 14:30 
GeneralRe: Template Pin
Michael Dunn16-Jul-05 14:54
sitebuilderMichael Dunn16-Jul-05 14:54 
GeneralRe: Template Pin
Alex_Y16-Jul-05 15:42
Alex_Y16-Jul-05 15:42 
GeneralRe: Template Pin
Jack Puppy16-Jul-05 16:05
Jack Puppy16-Jul-05 16:05 
GeneralRe: Template Pin
Tim Smith16-Jul-05 18:01
Tim Smith16-Jul-05 18:01 
QuestionCDialog::OnTimer() not called ?? Pin
Mukhan16-Jul-05 13:46
Mukhan16-Jul-05 13:46 
AnswerRe: CDialog::OnTimer() not called ?? Pin
Ravi Bhavnani16-Jul-05 14:32
professionalRavi Bhavnani16-Jul-05 14:32 
GeneralRe: CDialog::OnTimer() not called ?? Pin
Mukhan17-Jul-05 4:31
Mukhan17-Jul-05 4:31 
AnswerRe: CDialog::OnTimer() not called ?? Pin
Alex_Y16-Jul-05 14:33
Alex_Y16-Jul-05 14:33 
AnswerRe: CDialog::OnTimer() not called ?? Pin
Trollslayer17-Jul-05 6:04
mentorTrollslayer17-Jul-05 6:04 
GeneralRichTextBox- How to display last line entered. Pin
Freddie Code16-Jul-05 13:30
Freddie Code16-Jul-05 13:30 
GeneralRe: RichTextBox- How to display last line entered. Pin
bneacetp16-Jul-05 15:25
bneacetp16-Jul-05 15:25 
GeneralRe: RichTextBox- How to display last line entered. Pin
Freddie Code17-Jul-05 3:16
Freddie Code17-Jul-05 3:16 
GeneralRe: RichTextBox- How to display last line entered. Pin
Freddie Code17-Jul-05 5:01
Freddie Code17-Jul-05 5:01 

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.