Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by taskler

  1. taskler

    Segfault when indexing an array from function!

    nevermind forgot to malloc it.
  2. taskler

    Should I use pointers or use the struct "directly"?

    What's the advantage of using pointers vs using the structs direcxtly in this program? Ie should it be vector* vector_make_from(int vsize, double* d); instead? _____________ #include <math.h> #include <stdlib.h> #include "vector.h" #include <stdio.h> vector vector_make(int size) {...
  3. taskler

    Segfault when indexing an array from function!

    I am getting a segfault when running this, somehow because I'm using double* d wrong in vector_make_from. I need to use -> and pointers somehow I guess but don't get how. Should vector_make and *from return a pointer to a vector nit a vector? ______________________________ #include...
  4. taskler

    Computing factorial, problems!

    fixed it up a bit. problem is how to print a register? If I can do that it is a lot easier to test the program... .text # section declaration # we must export the entry point to the ELF linker or .global _start # loader. They conventionally recognize _start as their # entry...
  5. taskler

    Computing factorial, problems!

    I get a segfault when running this. I have several questions: 1. How do I print a register, for example eax? 2. Is the factorial function correct? should ret be in the end or could you use it in a cmp-clause? 3. Anything else? .text # section declaration # we must export the entry...

Part and Inventory Search

Back
Top