Click here to Skip to main content
15,892,927 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
includeh107-Apr-10 23:00
includeh107-Apr-10 23:00 
RantRe: Message of right-clicking on column header of CListCtrl Pin
Iain Clarke, Warrior Programmer7-Apr-10 23:05
Iain Clarke, Warrior Programmer7-Apr-10 23:05 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
Adam Roderick J7-Apr-10 23:06
Adam Roderick J7-Apr-10 23:06 
GeneralRe: Message of right-clicking on column header of CListCtrl Pin
David Crow8-Apr-10 3:40
David Crow8-Apr-10 3:40 
AnswerRe: Message of right-clicking on column header of CListCtrl Pin
Rolf Kristensen12-Apr-10 9:26
Rolf Kristensen12-Apr-10 9:26 
GeneralBarcode Application Usage [was: Re: Message of right-clicking on column header of CListCtrl] Pin
gvMadhav24-Jul-10 17:53
gvMadhav24-Jul-10 17:53 
Questionactivex Pin
mazizi7-Apr-10 18:52
mazizi7-Apr-10 18:52 
AnswerRe: activex Pin
Garth J Lancaster7-Apr-10 20:19
professionalGarth J Lancaster7-Apr-10 20:19 
AnswerRe: activex Pin
KingsGambit7-Apr-10 21:32
KingsGambit7-Apr-10 21:32 
QuestionMessageBox / Win32 Pin
Fareed Rizkalla7-Apr-10 14:47
Fareed Rizkalla7-Apr-10 14:47 
AnswerRe: MessageBox / Win32 Pin
Gwenio7-Apr-10 14:59
Gwenio7-Apr-10 14:59 
GeneralRe: MessageBox / Win32 Pin
Fareed Rizkalla7-Apr-10 15:03
Fareed Rizkalla7-Apr-10 15:03 
GeneralRe: MessageBox / Win32 Pin
Gwenio7-Apr-10 15:07
Gwenio7-Apr-10 15:07 
AnswerRe: MessageBox / Win32 Pin
wuyouzi297-Apr-10 21:03
wuyouzi297-Apr-10 21:03 
AnswerRe: MessageBox / Win32 Pin
KarstenK8-Apr-10 0:19
mveKarstenK8-Apr-10 0:19 
Questionfrom the index pos in ch[],delete the the string of len Pin
wbgxx7-Apr-10 13:17
wbgxx7-Apr-10 13:17 
I try to do this but the first function is error ,I don not know why ,could someone help me ,thank in advantage!!

void StrDelete1(char ch[], int pos,int len)
/*from the index pos in ch[],delete the the string of len*/
{
    if (pos<0 || pos >(MAX-len))
        {
            printf("the string delete error!");
            exit(1);
        }
    int i;
    for (i=0; i<MAX; i++)
    printf("%c", ch[i]);

    char *temp = (char*)malloc(sizeof(char));
    if (temp == NULL)
    {
       exit(1);
    }
    for (i=pos; i<MAX-len; i++)
    {
        temp = &ch[i];
         free(temp);
    }
    
    printf("\n");
       for(i=0; i<MAX; i++)
    printf("%c", ch[i]);
}

void StrDelete2(char ch[], int pos,int len)
{
   if (pos<0 || pos >(MAX-len))
        {
            printf("the string delete error!");
            exit(1);
        }
    int i;
    printf("\n");
    for (i=0; i<MAX; i++)
    printf("%c", ch[i]);

    char *temp = (char*)malloc(MAX-len);
    if (temp == NULL)
    {
       exit(1);
    }
    for (i=0; i<pos; i++)
    temp[i] = ch[i];
    for (i=pos; i<MAX-len; i++)
    {
        temp[i]=ch[i+len];
    }
    free(ch);
    printf("\n");
    for (i=0; i<MAX-len; i++)
    printf("%c", temp[i]);
} 

AnswerRe: from the index pos in ch[],delete the the string of len Pin
Richard Andrew x647-Apr-10 13:32
professionalRichard Andrew x647-Apr-10 13:32 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
wbgxx7-Apr-10 22:21
wbgxx7-Apr-10 22:21 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
Gwenio8-Apr-10 3:41
Gwenio8-Apr-10 3:41 
AnswerRe: from the index pos in ch[],delete the the string of len [modified] Pin
Gwenio7-Apr-10 13:41
Gwenio7-Apr-10 13:41 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
KarstenK8-Apr-10 0:21
mveKarstenK8-Apr-10 0:21 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
Gwenio8-Apr-10 3:33
Gwenio8-Apr-10 3:33 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
KarstenK8-Apr-10 3:48
mveKarstenK8-Apr-10 3:48 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
Gwenio8-Apr-10 4:24
Gwenio8-Apr-10 4:24 
GeneralRe: from the index pos in ch[],delete the the string of len Pin
KarstenK8-Apr-10 20:37
mveKarstenK8-Apr-10 20:37 

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.