Search:

Type: Posts; User: sababa.sababa

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    10,244

    Thanks a lot! In order to save RAM memory I...

    Thanks a lot!

    In order to save RAM memory I suppose one should use malloc. Is that a standard approach for dealing with values? When should one use regular variables and when should one use...
  2. Replies
    8
    Views
    10,244

    I've tried different ways but only this work with...

    I've tried different ways but only this work with my gcc-compiler:


    #include <stdio.h>

    int Input(){
    int something;
    scanf("%d", &something);
    return something;
    }
  3. Replies
    8
    Views
    10,244

    I upgraded the code, but it doesn't want to...

    I upgraded the code, but it doesn't want to compile:


    #include <stdio.h>

    int Calc(int x, int y, int*zpointer; int*apointer){
    scanf("%d", &x);
    scanf("%d", &y);
    &zpointer=y+x;...
  4. Replies
    8
    Views
    10,244

    Thanks! I tried both methods, now with passing...

    Thanks! I tried both methods, now with passing the values of two varibales, but get wrong output again:
    returning method:


    #include <stdio.h>

    int Calc(int x, int y){
    int z;
    int a;...
  5. Replies
    8
    Views
    10,244

    passing variables between functions

    Hi all!
    As a newbie I try to dig into every basic problem to learn the proper way of programming, instead of make a work-around. My question is: Why is the choice-variable not passed in a proper...
  6. Replies
    13
    Views
    1,444

    Thanks! in theAI: int *theAI(int *x, int...

    Thanks!
    in theAI:


    int *theAI(int *x, int *y){
    *x = ((rand() %300)+20);
    *y = ((rand() %300)+20);
    return x, y;
    }
  7. Replies
    13
    Views
    1,444

    OK, so now the code looks like this: struct...

    OK, so now the code looks like this:


    struct foo
    {
    int x;
    int y;
    char* pic;
    };
  8. Replies
    13
    Views
    1,444

    Thanks! Now it works! But is it a good or bad...

    Thanks! Now it works! But is it a good or bad idea to make "baz" global, like this:


    #include<stdio.h>
    struct foo
    {
    char *bar;
    };

    struct foo baz;
  9. Replies
    13
    Views
    1,444

    Thanks, but when I change the code to this: ...

    Thanks, but when I change the code to this:


    struct The
    {
    int x;
    int y;
    char* pic;
    } rabbit;
  10. Replies
    13
    Views
    1,444

    sprite loading

    Hi,

    I try to load a sprite map in this way:


    struct The
    {
    int x;
    int y;
    char[10] pic;
  11. Replies
    3
    Views
    3,217

    Now I've debugged deeper. The bug could be...

    Now I've debugged deeper. The bug could be deduced to this file:
    dfm sourcecode, iwc_8c-source.html, 0.99.9
    and the line that causes the bug is this:
    ...
  12. Replies
    3
    Views
    3,217

    Yes!!! I solved it! The bug was in this file:...

    Yes!!! I solved it! The bug was in this file:
    dfm sourcecode, timer_8c-source.html, 0.99.9

    ...and this code caused the bug:
    SendWindow(GetMoveWindow(),UPDATE_LIGHT);

    The solution was to...
  13. Replies
    3
    Views
    3,217

    ...by the way, here is the entire source code for...

    ...by the way, here is the entire source code for the program I'm trying to fix:
    dfm sourcecode, main_8c-source.html, 0.99.9

    I really like this file manager, but it crashes after about a minute...
  14. Replies
    3
    Views
    3,217

    new X11 and old XNextEvent

    Hi,

    I try to adapt some good old code to the environment of today. Further I've found that XNextEvent blocks the program I'm trying to debug. I read that this function worked in another way in the...
  15. Replies
    10
    Views
    1,374

    Thanks a lot for all the answers and comments! ...

    Thanks a lot for all the answers and comments!

    MK27, your explanation is great.
  16. Replies
    10
    Views
    1,374

    ...so a good rule of thumb would be to put the...

    ...so a good rule of thumb would be to put the function definitions in the .c files and all other stuff in the .h files. But why should I declare the function before I define it? Isn't it enough with...
  17. Replies
    10
    Views
    1,374

    Now I've studied some source code, and it seems...

    Now I've studied some source code, and it seems that there're only void functions in .c files (except the main function) and returning functions in .h files.

    Expat is what I searched for.
    ...
  18. Replies
    10
    Views
    1,374

    construction of source code

    Hi all!

    I've two n00b questions concerning the praxis of writing source code:

    1. I've understood that the source files can either have the file extension .h or .c, but when should I use which...
  19. Replies
    17
    Views
    2,047

    I'm not sure if I understand your problem, but a...

    I'm not sure if I understand your problem, but a sketch that I'd suggest is:


    #include <stdio.h>
    #include <string.h>

    fgets( ....read the line....)

    int i;
  20. A good tip: Show us the code...

    A good tip:
    Show us the code...
  21. Replies
    10
    Views
    1,432

    Thanks ZuK!

    Thanks ZuK!
  22. Replies
    10
    Views
    1,432

    Hurray! It's working the way I want... I made a...

    Hurray! It's working the way I want... I made a workaround, but I'm really currious why the loop in the previous post didn't work. Here's the new code:




    void theloop()
    {
    char...
  23. Replies
    10
    Views
    1,432

    I made a separate function for checking the ,.()...

    I made a separate function for checking the ,.() signs, but when askword is bigger than three letters, then save turns 0 even though wordtwo should be equal to wordask:




    void theloop()
    {...
  24. Replies
    10
    Views
    1,432

    I changed the code to this, but it doesn't work...

    I changed the code to this, but it doesn't work the way I want - the second strtok is not recognized.




    struct node* Build(struct node* head)
    {
    p = head->next;
    while(p->next)
    {
  25. Replies
    10
    Views
    1,432

    I solved the problem! It didn't work because I...

    I solved the problem!

    It didn't work because I tried to check the same variable two times with the strtok commands. The solution is that I made one loop of the second and third loop (see the first...
Results 1 to 25 of 61
Page 1 of 3 1 2 3