Search:

Type: Posts; User: redruby147

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. open bracket and underscore before function opening bracket

    Hi I've seen this around and I'm not sure what it is for. I've seen it in other projects and it compiles fine but when I tried:


    file_chooser_directory = gtk_file_chooser_button_new (_("Select a...
  2. Replies
    2
    Views
    2,520

    Compiling image into executable

    I've been using gtk and was wondering how images are put into executables so that it's self contained rather than referencing an image from a different location.
    For example, how would this icon be...
  3. I trespassed and it looks like I got shot!...

    I trespassed and it looks like I got shot! Allocated some memory for it and it's working now, thanks for the help. Yes the indentation is terrible, but it's fixed now.
  4. Are you sure that would be the problem Salem?...

    Are you sure that would be the problem Salem? It's just that there's quite a bit of free memory.


    total used free shared buffers cached
    Mem: ...
  5. Well it has a segmentation fault with sprinf,...

    Well it has a segmentation fault with sprinf, I've also tried printing out file_from_dir and dir_to_conv and they hold what they're supposed to.
  6. sprintf being weird and giving me a segfult.

    Hi, I'm trying to make a program to list files in a dir specified by a user, find all video files with magic and convert them so that the psp will play them. However I'm trying to pass the directory...
  7. Replies
    2
    Views
    1,610

    It should work if you run it at command line...

    It should work if you run it at command line (wherever that is on windows 7) and give it a text file. For example:


    $ ./loop.o < oof.txt
    8
  8. Oh dear, confusing variable names! Revisions have...

    Oh dear, confusing variable names! Revisions have been made. And the warning messages have disappeared. I'm not sure how placing a const int or a macro would create create such a difference when...
  9. warning: excess elements in array initializer

    I'm not sure why this code is giving the error message "warning: excess elements in array initializer". I've taken a look at:

    http://www.csc.liv.ac.uk/~grant/Teaching/COMP205/string.html

    and...
  10. Thanks, spawn seems to be what I'm looking for. I...

    Thanks, spawn seems to be what I'm looking for. I wrote this and i'm recieving error code -1, the file paths are relative, and all the files are in the correct location. Any ideas why it's giving...
  11. Removing windows command line after execution

    Is there any way to remove the command line after execution. For example, if you use the system function to invoke another program, the cmd is left in the background blank. Is there a function like...
  12. Replies
    14
    Views
    2,957

    Windows file paths.

    I'm not sure how to deal with file paths when programming in windows. Here is my attempt thus far.


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

    char eclipse[150];

    int main()
    {
  13. Replies
    4
    Views
    1,565

    Still receiving the same error as before :( ...

    Still receiving the same error as before :(


    make: *** No rule to make target `spe_example_csf.o', needed by `example'. Stop.
  14. Replies
    4
    Views
    1,565

    Not sure how to put this into a Makefile

    Hi , i'm not sure how to put this into a Makefile


    spu-gcc-4.3 spe_example.c -o spe_example;
    embedspu test_handle spe_example spe_example_csf.o;
    gcc ppe_example.c spe_example_csf.o -lspe2 -o...
  15. Replies
    4
    Views
    6,064

    Benchmarking

    Hi, I've seen cases where people benchmark their programs, for example at the bottom of this page the author highlights the effect of copying strings in different ways and the effect on execution...
  16. Replies
    160
    Views
    1,217,774

    Sticky: Practical C by Steve Oualline...

    Practical C by Steve Oualline. I'm quite fond of this book as it emphasizes good writing style and maintainable code. It also highlights how some needlessly compact their code and/or use cryptic...
  17. Replies
    11
    Views
    7,008

    Ah great, that worked really well. Done them all...

    Ah great, that worked really well. Done them all now, thanks again
  18. Replies
    11
    Views
    7,008

    Great, thanks people, imagemagick worked...

    Great, thanks people, imagemagick worked perfectly, i used


    chii:~/Desktop/Stimuli$convert hab14d1_007.bmp -fill blue -opaque white hab14d1_007done.gmpwhich did the job. I'm tempted to just put...
  19. Replies
    11
    Views
    7,008

    Changing pixel colour

    Hi, i have 2300 bitmap images very similar to this one

    http://mage.me.uk/files/hab12d1_001.bmp

    and what i basically need to do is change every white pixel in the image to blue. I haven't...
  20. Replies
    11
    Views
    1,441

    Solved, i stumbled upon this C: How can I...

    Solved, i stumbled upon this

    C: How can I split a number into digits? - Yahoo! Answers

    and then did this


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
  21. Replies
    11
    Views
    1,441

    How would you do this conversion?

    Say you have the argument to main in the form of ./program 447 758. How would the separation of those two numbers into integers be done for example to gain the result of.


    first_num[0] = 4;...
  22. Replies
    3
    Views
    7,475

    Thanks, so would argv[1][i]; turn the string into...

    Thanks, so would argv[1][i]; turn the string into an integer, I'm not entirely sure what that does. I modified the code:


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define MAX...
  23. Replies
    3
    Views
    7,475

    convert char array to int array

    What is the best method to do this? This is my attempt, which failed by the way :(.


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #define MAX 5

    int main (int argc, char...
  24. Replies
    6
    Views
    2,714

    Thanks for the feedback and code :D. But the...

    Thanks for the feedback and code :D. But the program only allows up to 8 digits.


    print_binary(x, 8);
    And if increased there are a lot of preceding zeros. I know it may be a bit over the top...
  25. Replies
    6
    Views
    2,714

    I thought it was allocated when i allocated the...

    I thought it was allocated when i allocated the entire structure.


    n = (struct numbers *) malloc (sizeof(struct numbers));
Results 1 to 25 of 37
Page 1 of 2 1 2