Search:

Type: Posts; User: p595285902

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,907

    struct symbolTable{ char name[symSize]; int...

    struct symbolTable{
    char name[symSize];
    int symline;
    struct symbolTable * next;
    };
    typedef struct symbolTable symboltable;
    typedef symboltable * ST;


    char * part;
  2. Replies
    10
    Views
    1,907

    the part I posted should do Make a function to...

    the part I posted should do
    Make a function to make a new node.
    Make a function to add info to a node.
    Make a function to add a node to the hash table.

    anything wrong with it?
  3. Replies
    10
    Views
    1,907

    Ye I read that ,its only a part of it

    Ye I read that ,its only a part of it
  4. Replies
    10
    Views
    1,907

    My bad about bumping , I was in a hurry of trying...

    My bad about bumping , I was in a hurry of trying to finish up my homework.

    symbolT is a global
    struct symbolTable{
    char name[symSize];
    int symline;
    struct symbolTable * next;
    };...
  5. Replies
    10
    Views
    1,907

    bring it up

    bring it up
  6. Replies
    10
    Views
    1,907

    struct node * []

    char * part;
    int hash;
    int lnum;
    struct node * new;//node has a char * name, int symline
    struct node * symbolT[90];
    hash_example_one(char *,int);//returns a int value



    if(strcmp(part,"\n")...
  7. Replies
    4
    Views
    2,618

    so why am I copying SOMETHING to every hextable...

    so why am I copying SOMETHING to every hextable array? I only want to copy into hextable[j];
    And whats the reason for malloc?
  8. Replies
    4
    Views
    2,618

    pinter pointer type

    suppose

    int ** hextable;
    .
    if((hextable =(int **) malloc(hsize))==NULL)//if failed to allocate memory
    {
    printf("Allocation failed.\n");
    exit(1);
    }
  9. Replies
    14
    Views
    27,527

    suppose I dont want the last letter in the string...

    suppose I dont want the last letter in the string


    char * p;
    .
    .
    .
    p=strncpy(p,p,strlen(p)-1)

    p=strncpy(p,p,strlen(p)-1) this line will not work, whats the right way to do it?
  10. Replies
    14
    Views
    27,527

    if(str[1] =='a') { printf("second...

    if(str[1] =='a')
    {
    printf("second letter is a\n");
    }

    yes this did what I want, but I am confused here.
    why 'a' not "a"
    and why == not strcmp
  11. Replies
    14
    Views
    27,527

    the thing I wanted is to compare a letter in...

    the thing I wanted is to compare a letter in string with a char, but I have trouble with getting the single letter in string.
    like

    if(strcmp(&str[1],"a") ==0)
    {
    printf("second...
  12. Replies
    14
    Views
    27,527

    int main(void) { char str[]="#abd:...

    int main(void)
    {
    char str[]="#abd: student.asm";
    char le[1];
    i=0;
    n = strlen(str);
    while(n>0)
    {
    strcpy(le,&str[]);
    n--;
  13. Replies
    14
    Views
    27,527

    int main(void) { char *str="#abd:...

    int main(void)
    {
    char *str="#abd: student.asm";
    printf("first = %s\n",&str[1]);
    return 0;

    }


    why the output is
  14. Replies
    14
    Views
    27,527

    yes this worked out ! put & before p[] will get...

    yes this worked out ! put & before p[] will get the error out
    thx man
  15. Replies
    14
    Views
    27,527

    last letter of char pointer

    suppose
    char * p;
    and then you set p points to a string,
    is there any way to get the last letter in p?
  16. Replies
    7
    Views
    1,817

    char **pStrings = malloc(NumberOfElements *...

    char **pStrings = malloc(NumberOfElements * sizeof(char*));// does this line means to create space for NumberOfElements of char pointers?
  17. Replies
    7
    Views
    1,817

    Would you mind to show me a example of mallocing...

    Would you mind to show me a example of mallocing pointer array?
  18. Replies
    7
    Views
    1,817

    I want a array list with pointers like [0]-> ->...

    I want a array list with pointers
    like [0]-> -> -> ->
    [1]-> -> -> ->
    [2]-> -> -> ->
    .
    .
    .
    which can increase itself when it reached its limit

    what shall I do?...
  19. Replies
    7
    Views
    1,817

    char pinter array

    suppose I had
    char * lines[50];//create 50 char pointers
    how can I increase to 100 or more char pointers?
  20. Thread: reading

    by p595285902
    Replies
    1
    Views
    759

    reading

    how do you check the thing you read in from file is int or char?
  21. Replies
    5
    Views
    9,960

    the file contains 4 byte int ye I found it wrong...

    the file contains 4 byte int
    ye I found it wrong and I changed it

    Oh i know how to do it now
    fread (&int,sizeof(int,1,dat));
    int will be an int hahaa
    thx bro
  22. Replies
    5
    Views
    9,960

    it prints out 0 for v. guess can not use atoi...

    it prints out
    0
    for v. guess can not use atoi for converting
  23. Replies
    5
    Views
    9,960

    fread to read int from binary file

    else if ((strcmp(t,"I"))== 0)
    {
    fread(n,sizeof(int),1 ,dat);//read tuple from dat
    v= atoi(n);
    ...
  24. Replies
    18
    Views
    7,290

    str can be printed and it works fine :D I think...

    str can be printed and it works fine :D I think you told me to use relation[x].nemae yesterday thx man
  25. Replies
    18
    Views
    7,290

    while(fgets(line,Char,que)!=NULL &&...

    while(fgets(line,Char,que)!=NULL && strcmp(line,"quit") !=0)//when the command is not eof
    {
    strcpy(curline,line);
    // printf("curline= %s\n",curline);
    ...
Results 1 to 25 of 55
Page 1 of 3 1 2 3