Click here to Skip to main content
15,884,099 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: from the index pos in ch[],delete the the string of len Pin
Eugen Podsypalnikov7-Apr-10 20:10
Eugen Podsypalnikov7-Apr-10 20:10 
QuestionRe: from the index pos in ch[],delete the the string of len Pin
David Crow8-Apr-10 3:43
David Crow8-Apr-10 3:43 
AnswerRe: from the index pos in ch[],delete the the string of len Pin
wbgxx8-Apr-10 4:00
wbgxx8-Apr-10 4:00 
Questioncannot convert from 'double' to 'class _variant_t * Pin
browneyes867-Apr-10 9:38
browneyes867-Apr-10 9:38 
AnswerRe: cannot convert from 'double' to 'class _variant_t * Pin
Iain Clarke, Warrior Programmer7-Apr-10 10:03
Iain Clarke, Warrior Programmer7-Apr-10 10:03 
AnswerRe: cannot convert from 'double' to 'class _variant_t * Pin
Eugen Podsypalnikov7-Apr-10 10:04
Eugen Podsypalnikov7-Apr-10 10:04 
Questionresolving a shortcut file name Pin
Alan Kurlansky7-Apr-10 9:30
Alan Kurlansky7-Apr-10 9:30 
AnswerRe: resolving a shortcut file name Pin
Nuri Ismail7-Apr-10 10:10
Nuri Ismail7-Apr-10 10:10 

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.