Search:

Type: Posts; User: rusyoldguy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    146

    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...
  2. Replies
    3
    Views
    146

    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...
  3. Replies
    3
    Views
    123

    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;
  4. 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...
  5. Replies
    7
    Views
    210

    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...
  6. Replies
    7
    Views
    210

    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)....
  7. 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;...
  8. Replies
    8
    Views
    180

    Sorry guys, for the comments in german!

    Sorry guys, for the comments in german!
  9. Replies
    8
    Views
    180

    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...
  10. Replies
    2
    Views
    137

    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...
  11. Replies
    11
    Views
    307

    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...
  12. 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)
  13. Replies
    14
    Views
    440

    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
  14. Replies
    13
    Views
    923

    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)
  15. Replies
    13
    Views
    923

    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)
  16. 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...
  17. 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...
  18. 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
    ...
  19. 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...
  20. Replies
    22
    Views
    1,015

    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....
  21. Replies
    22
    Views
    1,015

    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...
  22. Replies
    5
    Views
    409

    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...
  23. Replies
    8
    Views
    553

    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...
  24. Replies
    18
    Views
    1,306

    Hallo knik 653! May be you did mean something...

    Hallo knik 653!

    May be you did mean something like this below?


    #include <stdio.h>
    #include <stdlib.h>
    /** running average berechnet waehrend der Eingabe der Werte den Mittelwert
    * und...
  25. Replies
    12
    Views
    842

    Hi Nwb! What is, when you try to use your own...

    Hi Nwb!

    What is, when you try to use your own "getch() like this:


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

    /// reads from keypress, doesn't echo
Results 1 to 25 of 27
Page 1 of 2 1 2