Search:

Type: Posts; User: telmo_d

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    5,094

    information about file - stat sys call

    I want to implemment ipc as is described in the comments. I'am having trouble with the stat sys call. After receiving file name in server if i write
    printf("%ld\n", st.st_size); i get 1 when the...
  2. Replies
    3
    Views
    1,115

    Sorry about that, here's the code: #include...

    Sorry about that, here's the code:


    #include <stdio.h>

    void quicksort(int *a, int start, int end);
    int partition(int *a, int start, int end);
    void print_array(int *a, int len);
    void...
  3. Replies
    3
    Views
    1,115

    problem implementing quicksort

    Can anyone tell me what's wrong with my quicksort? It seems fine but when i run it seg faults. I've been looking for some time but can't figure out the problem.


    void quicksort(int *a, int...
  4. Replies
    4
    Views
    1,208

    I thought i had figured out it works on my system...

    I thought i had figured out it works on my system that is just allocated space and then put variable starting at the end of the allocated space in the order they appeared. Turns out that's not...
  5. Replies
    4
    Views
    1,208

    address of stack variables

    Stack grows from high memory to low memory. Knowing that i declared 3 variables and was expecting that the first declared would have the biggest address, and the last one the lowest. It didn't turn...
  6. Replies
    4
    Views
    599

    I did print the addresses. Interesting output....

    I did print the addresses. Interesting output. They get laid out one right after the other, in the order they appear on the code. But once again how are they actually linked?


    in main() var = 5,...
  7. Replies
    4
    Views
    599

    How are they linked to their functions? Once a...

    How are they linked to their functions? Once a function does it's job it's effectively gone. When it comes again it has to know which static variable to use and there may be many with the same name....
  8. Replies
    4
    Views
    599

    static variables and functions

    Hi. My understanding of functions is that whenever there is a function call stack space is allocated for that function and local variables are stored there and when a function does its job all those...
  9. Replies
    1
    Views
    389

    foreground vs background concept

    As an exercise i'am implemmenting a simple shell and now i'am trying to implemment foregorund and background.
    All i know about this at the moment is that if there an & after a command it runs on...
  10. Replies
    2
    Views
    1,480

    Now i see. Thanks.

    Now i see. Thanks.
  11. Replies
    2
    Views
    1,480

    execvp(), wait() and child process

    Why is it a error in this block of code if child process reaches line after execvp()?
    Does the child run the wait system call too if it happens to execute first? Or is the wait() function only for...
  12. Replies
    5
    Views
    1,300

    Thanks that fixed the problem.

    Thanks that fixed the problem.
  13. Replies
    5
    Views
    1,300

    Linux Mint and i'am using nano.

    Linux Mint and i'am using nano.
  14. Replies
    5
    Views
    1,300

    Makefile missing separator error

    I'am getting this error when i try to run make. I think its the damn tab. I wanted to add some files to the makefile however i noticed that my tabs aren't the same as the ones that were already on...
  15. Replies
    3
    Views
    809

    Didn't work but solved it by installing package...

    Didn't work but solved it by installing package build-essential. If anyone has same problem this could solve. This was a fresh linux mint installation.
  16. Replies
    3
    Views
    809

    gcc and cc can't recognize includes

    Whenever i try to compile with either gcc or cc i get following error:

    fatal error: sys/types.h: No such file or directory
    #include <sys/types.h>

    I did this command that i found with a search...
  17. Replies
    2
    Views
    724

    Never mind just realized this is Pythagorean...

    Never mind just realized this is Pythagorean theorem, i just have to think of radius as hypotenuse.
  18. Replies
    2
    Views
    724

    Intuition for point inside circle formula

    I know from searching the internet that x and y must satisfy (x - center_x)^2 + (y - center_y)^2 < radius^2.
    However i'd like to develop some intuition for this not just know the formula but...
  19. Thanks that solved that particular problem. Now i...

    Thanks that solved that particular problem. Now i get a another one: 'BinaryTreeNode' is not a template

    I'am i doing it right?




    #include <iostream>
    #include <memory>
    using namespace std;
  20. Eclipse Kepler unique_ptr coul not be resolved

    Ecplise says "Symbol 'unique_ptr' could not be resolved". How to correct this? I tried using flag -std=c++0x or -std=c++11 like this:...
  21. Replies
    23
    Views
    4,323

    Best way to reset array to zeros?

    I need an array that in start of iteration need to be all zeros. Is it better to free it at end of iteration and call calloc at start of each iteration or its better to run a for loop at the end to...
  22. skipping white spaces file and going back one line in a file

    I have a file with a bunch of numbers to read that i want to store in structure like a Person that has age, id and so on.
    There are 2 problems. First is that each line either has one of the things...
  23. Replies
    11
    Views
    1,206

    Yes how i would like to know what is used to...

    Yes how i would like to know what is used to store the current line when that call stops so that when it that call works again it knows which work already is done.
  24. Replies
    11
    Views
    1,206

    recursion behind the scenes

    When a function calls it self in preorder travelsal how does it know when it goes back to that same node that left child is already visited?
  25. Replies
    2
    Views
    499

    timming of ++ incremment

    array[i++] = 5;



    array[i++] = //super long expression

    I know first one works fine now with second i was never confident so up to now i played it safe by doing i++ on separate statement.
    I'd...
Results 1 to 25 of 182
Page 1 of 8 1 2 3 4