Search:

Type: Posts; User: Hunter_wow

Search: Search took 0.00 seconds.

  1. Replies
    15
    Views
    13,954

    Thanks Salem! Just one more thing. If I add a...

    Thanks Salem! Just one more thing. If I add a loop to do that twice it seems like the result are not printed out directly. Instead it puts it into the buffer until the loop/main are finished before...
  2. Replies
    15
    Views
    13,954

    Hello again :D. I have restarted the problem but...

    Hello again :D. I have restarted the problem but having a hard time getting it to work without the popen. It seems like wc gets the wrong result from ls,

    Any ideas why?

    //create a pipe
    int...
  3. Replies
    15
    Views
    13,954

    Seems to work great. Thanks a lot mate. :D

    Seems to work great. Thanks a lot mate. :D
  4. Replies
    15
    Views
    13,954

    I might be wrong but it looks to me that it would...

    I might be wrong but it looks to me that it would be executed as two separate commands by doing that way. Or?
    "---- exec the 'wc' command"
    will run and die before we go on to the
    "---- exec the...
  5. Replies
    15
    Views
    13,954

    Seems nice. But I would prefer not to use...

    Seems nice. But I would prefer not to use scripting. Any hint on how it would look in C?
  6. Replies
    15
    Views
    13,954

    Yes. That is what I have tried to do. Have a...

    Yes. That is what I have tried to do. Have a working fork together with pipe to send the result from execvp to the parent process. But when I have executed "ls" for the first process I need to use...
  7. Replies
    15
    Views
    13,954

    Combine execvp result

    Hi. I have problems with the execvp command. I would like to run multiple commands. For example:

    Right now it works fine if I write:

    har *argv[2] = {"ls",NULL};
    execvp("ls", argv);
    But how do...
  8. Replies
    9
    Views
    1,640

    Thanks a lot matsp. I removed the pointer and...

    Thanks a lot matsp. I removed the pointer and "new". But now I would like to run a method who is located into the source file of the Header file.


    className::vname[0].methodName();

    But getting...
  9. Replies
    9
    Views
    1,640

    Thanks. I will try to make it without "new" then....

    Thanks. I will try to make it without "new" then. But this raise other errors.
    I want to put my "className name;" into a vector created/declare into my Header file like this:


    static...
  10. Replies
    9
    Views
    1,640

    make "new" object

    Hello. I´m trying to make a new object into my main():


    objectName name = new objectName();

    Where "objectName" is a class into my Header file.
    But I´m reciving the error:
  11. Replies
    8
    Views
    1,168

    Just one more small question: is it possible to...

    Just one more small question: is it possible to get the x and y values from this?


    Point foo = { 1, 2 };
    list.push_back(foo);
    // tried this but dosent seems to be the correct way
    int x =...
  12. Replies
    3
    Views
    2,907

    Tons of thanks. That random_shuffle was very...

    Tons of thanks. That random_shuffle was very easy. Perfect for my purpose =)
  13. Replies
    8
    Views
    1,168

    Tons of thanks. Seems to work great =D

    Tons of thanks. Seems to work great =D
  14. Replies
    8
    Views
    1,168

    Point foo(1,2); gives: error C2078: too many...

    Point foo(1,2);
    gives:

    error C2078: too many initializers
    error C2440: 'initializing' : cannot convert from 'int' to 'Point'

    and

    lista.push_back(Point(1, 2));
    gives:
  15. Replies
    8
    Views
    1,168

    I´m sorry. I started with C++ very recently and...

    I´m sorry. I started with C++ very recently and dont know how to handle the typedef. Have tried all I can come up with but it still dosent work. What would you set "foo" to for example?
    Just some...
  16. Replies
    3
    Views
    2,907

    Create random array

    Hello. I´m looking for a good way to make a array in random order. But I really cant come up with anything good. Thought of something like this(sorry if syntax is wrong, but I guess you can see what...
  17. Replies
    8
    Views
    1,168

    How to "push" points to a list

    Hello. I would like to know how I set in Points(x,y) to a list. Like this:


    #include <list>

    //Defining point type
    typedef struct Point{
    int x, y;
    }Point;
Results 1 to 17 of 17