Click here to Skip to main content
15,880,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to Hide Caption Bar using SetWindowLong() Pin
santhoshv849-Dec-07 20:46
santhoshv849-Dec-07 20:46 
AnswerRe: How to Hide Caption Bar using SetWindowLong() Pin
Nishad S10-Dec-07 0:06
Nishad S10-Dec-07 0:06 
AnswerRe: How to Hide Caption Bar using SetWindowLong() Pin
Paresh Chitte10-Dec-07 0:39
Paresh Chitte10-Dec-07 0:39 
QuestionHow to enable Drag and Drop for tree view Pin
Javed Akhtar Ansari9-Dec-07 19:51
Javed Akhtar Ansari9-Dec-07 19:51 
GeneralC coding - structure Pin
chanduabcchandu9-Dec-07 18:35
chanduabcchandu9-Dec-07 18:35 
Answer[Message Deleted] Pin
Vince Rojas9-Dec-07 20:13
Vince Rojas9-Dec-07 20:13 
GeneralRe: C coding - structure Pin
toxcct9-Dec-07 21:01
toxcct9-Dec-07 21:01 
AnswerRe: C coding - structure [modified] Pin
Vince Rojas9-Dec-07 21:29
Vince Rojas9-Dec-07 21:29 
// Another way would be to use a linked list (is the code viewable?):


#include "stdlib.h" // FOR malloc()
#include "stdio.h"  // FOR printf()

struct tagMystruct {
    char *name;
    int nameLength;
    char *disign;
    int disgLength;
    struct tagMystruct *next;
};

typedef struct tagMystruct item;

// GLOBAL VARIABLES
item *curr, *head = NULL;

// FUNCTION DECLARATIONS
void AddEntry(char *name, int nameLength, char *disign, int disgLength);
void ShowEntries();

void main()
{
    AddEntry("Chandu", 6, "My Char", 7);
    AddEntry("Any name", 8, "Any disign", 10);

    ShowEntries();
}

void AddEntry(char *name, int nameLength, char *disign, int disgLength)
{
    curr = (item*)malloc(sizeof(item));
    curr->name = name;
    curr->nameLength = nameLength;
    curr->disign = disign;
    curr->disgLength = disgLength;

    curr->next = head;
    head = curr;
    curr = head;
}

void ShowEntries()
{
    while(curr)
    {
        printf("%s\n", curr->name);
        printf("%d\n", curr->nameLength);
        printf("%s\n", curr->disign);
        printf("%d\n\n", curr->disgLength);

        curr = curr->next;
    }
}


modified on Monday, December 10, 2007 3:42:36 AM

QuestionIs there an equivalent to CString Format in std::string ? Pin
uusheikh9-Dec-07 18:31
uusheikh9-Dec-07 18:31 
AnswerRe: Is there an equivalent to CString Format in std::string ? Pin
Stephen Hewitt9-Dec-07 19:37
Stephen Hewitt9-Dec-07 19:37 
GeneralRe: Is there an equivalent to CString Format in std::string ? Pin
uusheikh9-Dec-07 20:38
uusheikh9-Dec-07 20:38 
AnswerRe: Is there an equivalent to CString Format in std::string ? Pin
Javed Akhtar Ansari9-Dec-07 19:50
Javed Akhtar Ansari9-Dec-07 19:50 
GeneralRe: Is there an equivalent to CString Format in std::string ? Pin
toxcct9-Dec-07 20:58
toxcct9-Dec-07 20:58 
GeneralWant some information about Class Size Pin
ashishbhatt9-Dec-07 16:33
ashishbhatt9-Dec-07 16:33 
GeneralRe: Want some information about Class Size Pin
Rajasekharan Vengalil9-Dec-07 18:56
Rajasekharan Vengalil9-Dec-07 18:56 
GeneralRe: Want some information about Class Size Pin
Mark Salsbery10-Dec-07 7:48
Mark Salsbery10-Dec-07 7:48 
Questionabout multi monitor-how to displays same part of the virtual screen in two monitors [modified] Pin
firepotato9-Dec-07 13:19
firepotato9-Dec-07 13:19 
GeneralSetup.exe creating Pin
ddspliting9-Dec-07 7:02
ddspliting9-Dec-07 7:02 
GeneralRe: Setup.exe creating Pin
MarkB7779-Dec-07 13:54
MarkB7779-Dec-07 13:54 
GeneralRe: Setup.exe creating Pin
Nelek9-Dec-07 20:56
protectorNelek9-Dec-07 20:56 
GeneralPrining letters made of letters [modified] Pin
tashe9-Dec-07 6:19
tashe9-Dec-07 6:19 
GeneralRe: Prining letters made of letters Pin
Nelek9-Dec-07 20:55
protectorNelek9-Dec-07 20:55 
GeneralStack overflow Pin
RomTibi9-Dec-07 4:34
RomTibi9-Dec-07 4:34 
GeneralRe: Stack overflow Pin
Cedric Moonen9-Dec-07 4:41
Cedric Moonen9-Dec-07 4:41 
GeneralRe: Stack overflow Pin
RomTibi9-Dec-07 6:17
RomTibi9-Dec-07 6: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.