Search:

Type: Posts; User: implor

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    21,573

    Syntax error at end of input

    I'm getting a "Syntax error at end of input" (last line). but i can't find what's wrong.


    int main() {
    int ett;
    FILE *filen;
    int val;
    char filnamn[40];
    enum filtyp {db,txt,bin};
    typedef...
  2. Replies
    26
    Views
    5,418

    qsort() and pointer problem

    i'm trying to sort a array using qsort() but i just get junk printed. It probably has something to do with my pointers but i can't find what's wrong.


    #include <stdio.h>
    #include <stdlib.h>...
  3. Replies
    9
    Views
    1,856

    It's printing correct now. Thanks! but when it...

    It's printing correct now. Thanks! but when it reach return 0 in main() the window close, should it do that? I use DeV-C++
  4. Replies
    9
    Views
    1,856

    Now p1 is a pointer. now i get back to a old...

    Now p1 is a pointer. now i get back to a old problem (p1 was a pointer before) now i get Segmentation Fault at




    #include <stdio.h>
    #include <stdlib.h>
    #include "lab41.h"
    person...
  5. Replies
    9
    Views
    1,856

    allright. I'm trying to allocate memory with...

    allright. I'm trying to allocate memory with malloc but i'm getting a error.

    &p1 = (person*) malloc(sizeof(person));

    error: invalid lvalue in assignment
  6. Replies
    9
    Views
    1,856

    allright, I change personer[10] to a global...

    allright, I change personer[10] to a global varible and that it only print one post. but still the same.

    output.

    client128-24:CORSAIR $ ./a.out
    enter filename:: p.txt
    Johan olsson
    32
    64
  7. Replies
    9
    Views
    1,856

    problem with arrays

    when I print out my array in one place it works fine, in another function the same code don't work.

    my code

    #include <stdio.h>
    #include <stdlib.h>
    #include "lab41.h"

    int readfil(FILE...
Results 1 to 7 of 7