Search:

Type: Posts; User: rusyoldguy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    93

    Hello varja11! If you want to print the...

    Hello varja11!

    If you want to print the address of a variable it is better tu use '%p' instead of 'd'
    All three variables of int have the same size, so they starts at the same place in memory....
  2. Replies
    4
    Views
    195

    May be here is an example what can help you: ...

    May be here is an example what can help you:


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


    void deztobin(unsigned int decimalvalue, char zudi[], int prezeros);
    void...
  3. Replies
    3
    Views
    151

    By the way i think it could be a reason to...

    By the way i think it could be a reason to declare the length of the array str[] by 'N':
    the string what you read in in line 17 of your example is not limited.
    That could be a reason.
    Now my...
  4. Replies
    3
    Views
    151

    Hello Chibisco! the next input with _getch()...

    Hello Chibisco!

    the next input with _getch() takes the character from the keyboard-buffer of the last input.
    Co can delete this buffer with a simple function:



    void...
  5. Replies
    3
    Views
    128

    Hallo abhi143! I hope the example below will...

    Hallo abhi143!

    I hope the example below will give you some inspirations:


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

    struct node {
    int x;
  6. That's clear, because yo call the function 'sum'...

    That's clear,
    because yo call the function 'sum' first in line 47 as the first argument of function 'sumResult'
    and then in line 48 again. The variable 'n' is only valid in 'sum', after calling...
  7. Replies
    7
    Views
    212

    A example who is better to understand is: ...

    A example who is better to understand is:


    #include <stdio.h>
    #include <stdlib.h> /* strncpy, EXIT_SUCCESS */
    #include <string.h> /* strlen */


    // copies a part of a string of zfolge from...
  8. Replies
    7
    Views
    212

    I'm trying to write a function ('rotate') that...

    I'm trying to write a function ('rotate') that rotates the first n elements of my string array arr by shift positions in the clockwise direction if shift is positiv (anti-clockwise if negativ shift)....
  9. 1-I don't know how to make C understand that I...

    1-I don't know how to make C understand that I want it to take into account a button I pressed without requiring ENTER.

    For Linux i found this little Program:


    /* -*- Mode: C;...
  10. Replies
    8
    Views
    183

    Sorry guys, for the comments in german!

    Sorry guys, for the comments in german!
  11. Replies
    8
    Views
    183

    gets() has been removed from the C11 Standard ...

    gets() has been removed from the C11 Standard

    You can take


    scanf("%19[^\n]", ten[i]);


    This code is an example to tell 'scanf' for read all letter(including space) but not the...
  12. Replies
    2
    Views
    138

    Hi, you're right. I think it would be good to...

    Hi,

    you're right. I think it would be good to clear with a little function
    the keyboard-buffer to prevent that the next call of 'scanf'
    takes the signs who are in the keyboard-buffer after the...
  13. Replies
    11
    Views
    310

    I think he want's to calculate the day of the...

    I think he want's to calculate the day of the week given by a date, or the Date of Easter Sunday given by a year. May be according the formula of Zeller's congruence, Butcher or Gauss. But it looks...
  14. Hi nerx! The second way to do it is: ...

    Hi nerx!

    The second way to do it is:


    #include <stdio.h>

    int fact(int num); // don't forget the right declaration

    int main(int argc, char **argv)
  15. Replies
    14
    Views
    443

    Hi Yoav! I have only a simple Program with...

    Hi Yoav!

    I have only a simple Program with comments in german, but may be it can help you:

    first the file permutieren.h



    #ifndef PERMUTATION_H_INCLUDED
    #define PERMUTATION_H_INCLUDED
  16. Replies
    13
    Views
    949

    With two little changes of the last examples: ...

    With two little changes
    of the last examples:


    #include <stdio.h>
    #include <termios.h>
    #include <unistd.h>
    #include <fcntl.h>

    int kbhit(void)
  17. Replies
    13
    Views
    949

    usein kbhit() in c instead of inkey in qbasic

    Hallo zach!
    May be if you work with Linux, you can use kbhit() from this example:


    #include <stdio.h>
    #include <termios.h>
    #include <unistd.h>
    #include <fcntl.h>

    int kbhit(void)
  18. Hi flp1969, I changed my makefile to CC =...

    Hi flp1969,

    I changed my makefile to


    CC = cc
    LD = g++
    CFLAGS := -g -O0 -Wall -c
    SOURCE := main.cpp Bohrung.cpp Bohrwelle.cpp Getvalwelle.cpp Wellen.cpp
    OBJ := main.o Bohrung.o...
  19. Error by creating a rpm package from soource with rpmbuild

    Hello!

    I am working with SUSE LINUX tumbleweed and want to create a rpm package
    with rpmbuild not as Super User. This is my first time trying to create a rpm.
    I created my programs in the past...
  20. build rpm form a csource rpmbuild returns a error

    Buid rpm -packages from Source

    Hallo,

    heretorfore i created my programs with an IDE like codelite, codeblocks , QT-Creator or Anjuta.
    I starded them from the shell, example:
    ./passungen
    ...
  21. Hi askis! May be this example below can help...

    Hi askis!

    May be this example below can help you:


    /** tallybit.c read in a integer value, as a 4-Byte(32Bit) integer
    * and counts the digits where are set and not set.
    * If you read in...
  22. Replies
    22
    Views
    1,016

    If you don't save the values you've put in, you...

    If you don't save the values you've put in, you can only calculate min, max, average, range, not the standard deviation.
    If you don't need the standard deviation it is enough to us a code like this....
  23. Replies
    22
    Views
    1,016

    Hi kelu! Better you read at first all values...

    Hi kelu!

    Better you read at first all values in, for example diameters of parts made by a lathe-machine.
    Then you search the max value in the array.
    Now set min to max.
    After this you can find...
  24. Replies
    5
    Views
    412

    Hi costycnc! I think you need to parse the...

    Hi costycnc!

    I think you need to parse the string by using the adress (X,Y,Z,I).
    Here a little example with gcc written on Linux with codeblocks:
    first the header "cngnum.h":


    #ifndef...
  25. Replies
    8
    Views
    557

    Hi Lyrockzz! Adrian is right, you need 4...

    Hi Lyrockzz!

    Adrian is right, you need 4 arguments used by 'distance' in line 22.

    erg1 is unused and can receive the return value of 'distance'
    example:


    #include <stdio.h>
    #include...
Results 1 to 25 of 29
Page 1 of 2 1 2