Search Results - JustLinux Forums


Search:

Type: Posts; User: truls

Page 1 of 11 1 2 3 4

Search: Search took 0.14 seconds.

  1. Replies
    6
    Views
    1,669

    Well list still have all the operations you'll...

    Well list still have all the operations you'll need, like push_back and insert. You can sort a list in the same way as a vector and most of the operations are the same, so I don't really understand...
  2. Replies
    6
    Views
    1,669

    Use a list. Iterators to list elements are only...

    Use a list. Iterators to list elements are only invalidated if the object pointed to is removed. Otherwise insertions and removals does not invalidate iterators.
  3. Replies
    6
    Views
    1,777

    If you post some code we can look at that and...

    If you post some code we can look at that and give you some pointers. Also post the command line you are using to compile it and the errors it gives you.
  4. Replies
    10
    Views
    2,297

    The current path (.) is not in the default search...

    The current path (.) is not in the default search path for an executable.
    If you want to run a program in the current directory, prepend ./ to the name.
    In other words:
    #./test.py
    And you...
  5. Replies
    3
    Views
    6,327

    Correction: One little thing. The pattern...

    Correction:

    One little thing. The pattern should be:
    /\d+/
    to ensure that you get at least one digit. This ensures that the first element of the array is an integer.

    + means at least one...
  6. Replies
    3
    Views
    6,327

    myint = mystring.scan(/\d*/) I think myint...

    myint = mystring.scan(/\d*/)

    I think myint will be an array, so you will just have to pick the first element.
  7. Replies
    2
    Views
    1,042

    I'm just guessing here, but since the =~ operator...

    I'm just guessing here, but since the =~ operator seems to be the regexp operator in Ruby as well as Perl, shouldn't the code read:

    if x.to_s =~ /line/

    At least in Perl all regexp expressions...
  8. Replies
    5
    Views
    1,297

    my @array = `perl script.pl`; Assuming...

    my @array = `perl script.pl`;

    Assuming script.pl prints the output as a number of lines. The command runs an external program and puts the resulting output into an array.

    BTW: If you are going...
  9. It crashes because you have not allocated any...

    It crashes because you have not allocated any memory for gbuf. If you try to add:

    gbuf = malloc(4096);
    It will work exactly as if you were using gbuf[4096].

    The reason that you don't need to...
  10. Great that it's working. The reason it worked on...

    Great that it's working. The reason it worked on my machine could probably be that the variables are laid out differently in memory. When you go one over on your machine, you set a pointer to zero....
  11. Im reformatting and reorganizing bits of the code...

    Im reformatting and reorganizing bits of the code to get an overview, but the first thing that struck me was this:

    for(z=0;z<=numberofsinks;z++)
    Are you sure that you want to use <=?
    Arrays in...
  12. Well, it compiles and runs fine on my mac. The...

    Well, it compiles and runs fine on my mac. The major problem with the code is that the define_depression is not properly formatted, you have multiple statements on a single line, and it's too long....
  13. Replies
    6
    Views
    1,062

    It would of course help a bit if ANSI sold the...

    It would of course help a bit if ANSI sold the C99 standard for something less than the $281 they are charging now. Why the C++ standard can be downloaded for $20 or thereabouts while the C99...
  14. Well, since till_pars contains a multi-array,...

    Well, since till_pars contains a multi-array, which is basically pointers to pointers, if define_depressions is faulty and overwrites any of these pointers you will get an access violation when...
  15. Replies
    6
    Views
    1,062

    #include You are missing the...

    #include <stdlib.h>

    You are missing the include file that defines the exit() function. "Implicit declaration" generally means that gcc did not find a definition for a function that you are...
  16. I guess that ch is allocated on the stack, and if...

    I guess that ch is allocated on the stack, and if so it could be that you are writing too much to it and thus mess up the stack. The function will then crash when it tries to return to the point...
  17. Replies
    2
    Views
    953

    You could start by checking the return values of...

    You could start by checking the return values of shmget and check what errno says. You get the segmentation fault because shmget is returning -1 when it faults, so if you check errno you will get an...
  18. Replies
    17
    Views
    2,913

    Sit down, relax, breathe in - breathe out. I...

    Sit down, relax, breathe in - breathe out.

    I think I found it, and it's one of those really annoying bugs that C just loves to throw at you. Here goes:

    *matrix[i] and (*matrix)[i] is not the...
  19. Replies
    17
    Views
    2,913

    Could you please post the complete program as it...

    Could you please post the complete program as it is, including the syntax for the file you want to read so it's possible to compile and run the program? It's getting a bit confusing as to what...
  20. Replies
    11
    Views
    1,486

    Interestingly enough, if you set i to 4294967196...

    Interestingly enough, if you set i to 4294967196 and compile you get the following warning:

    warning: this decimal constant is unsigned only in ISO C90
    Also, if you check UINT_MAX (defined in...
  21. Thread: Compile Request

    by truls
    Replies
    4
    Views
    1,186

    Seems like this was a program that was once...

    Seems like this was a program that was once written to be portable, and has then been windowized. I did some hacking and got hlvis to compile (I'll tell you how to get the others going later).
    ...
  22. Thread: Compile Request

    by truls
    Replies
    4
    Views
    1,186

    If you could put the source code on a web-server...

    If you could put the source code on a web-server or give a link to somewhere we could download it and see what it is like, that would help a lot in answering this.
  23. Thread: Adrift In Java

    by truls
    Replies
    6
    Views
    1,220

    The confusing thing is that people are using the...

    The confusing thing is that people are using the word Java about both the language and the libraries.

    Java the language is pretty simple to use, and it's probably what you have learned. It's all...
  24. Thread: g++/g++296

    by truls
    Replies
    2
    Views
    2,557

    Find out where the g++296 command is by issuing...

    Find out where the g++296 command is by issuing the command 'which g++296', go to this directory and create a soft link to this command with the name g++: ln -s g++296 g++

    I think that is the...
  25. Replies
    3
    Views
    1,221

    rec.name is a pointer to a character (or...

    rec.name is a pointer to a character (or character array), but you did not allocate any memory for this array so it crashes.

    If you tried changing the definition of name to, for example, char...
Results 1 to 25 of 266
Page 1 of 11 1 2 3 4