MrNoob 24 Posting Whiz in Training

well maybe u can define ; as a other name then use other name as derived type

MrNoob 24 Posting Whiz in Training

just do nested loop first loop looping through file and 2nd loop checking if that string is contained within if its contained then use strstr and delete that by placing NULL at its ptr then rewrite it to other file

jephthah commented: write NULLs in the middle of a file to delete a line? Seriously?? -1
MrNoob 24 Posting Whiz in Training

well bascially here i started with K&R excerises with remove tabes and spaces i m not sure why my programs works in my head it does but even in puesdo code i did it does but arr[j] sometimes get intilised to values before

#include <stdio.h>
#include <ctype.h>
#define STOP -1
int GetLine(char *SzBuff) {
    int i=0;
    char c;
    for( i=0;(c=getchar())!='\n';i++) {
        SzBuff[i]=c;
        if(c==EOF)  return -1;
    }
    SzBuff[i]='\0';
    return i;
}
int IsDel(char c) {
    if(c==' ' || c=='\t')   return 1;
    return 0;
}
void RemoveBlanks(char * SzString) {
    int j=0;
    while(*SzString) {
        if(!IsDel(*SzString)) { //wtf why the hell does it keep incrementing !!!
            SzString[j++]=*SzString;
            //putchar(SzString[j]);//used for debug
            //getchar();
            //j++;
        }
        SzString++;//this should fucken end the loop why the hell it keep going on incrementing
    }
    SzString[j]='\0';
    return;
}
int main(void)
{
    char SzName[100];
    while(GetLine(SzName)!=STOP) {
        RemoveBlanks(SzName);
        if(SzName[0]=='\0')//skip blank lines
            continue;
        puts(SzName);
    }
    return 0;
}

here in RemoveBlanks function
i made this puesdocode for it
while(string not = '\0')
if(not equal to characters specefied)
copyString to String[j] character by character

i don't know whats wrong in it ?

MrNoob 24 Posting Whiz in Training

just make it as an atoi but change base 10 to 16 you can make it unverisal aswell that work for all bases by applying a 2nd argument in atoi copy specifying the base

Dave Sinkula commented: At best I might guess you meant the nonstandard itoa, but I fail to see where that fits into this thread. -6
MrNoob 24 Posting Whiz in Training

hello guys i m wondering how to convert hex to string

kvprajapati commented: I am too. Don't spam. -2
MrNoob 24 Posting Whiz in Training

just use strstr and use its return value to copy it

yellowSnow commented: Stop posting for the sake of posting .. it's annoying! -1
MrNoob 24 Posting Whiz in Training

also if your using win its better to use dev or msv6

jephthah commented: no. sorry. -2
tux4life commented: absolutely wrong -2