Search:

Type: Posts; User: rusyoldguy

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    125

    I hope this example could help you: /*...

    I hope this example could help you:


    /* Example for scanf to limit the number of characters where read into a string
    In this example scanf reads only characters are stored between the square...
  2. Replies
    6
    Views
    222

    Hallo Lolcoman! May be you can use strtok()...

    Hallo Lolcoman!

    May be you can use strtok() declared in string.h (also cstring)
    you can see a example:


    // splits a String into several parts
    #include <stdio.h> //printf
    #include...
  3. Replies
    2
    Views
    111

    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....
  4. Replies
    4
    Views
    219

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

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

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

    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;
  8. 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...
  9. Replies
    7
    Views
    221

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

    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)....
  11. 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;...
  12. Replies
    8
    Views
    195

    Sorry guys, for the comments in german!

    Sorry guys, for the comments in german!
  13. Replies
    8
    Views
    195

    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...
  14. Replies
    2
    Views
    144

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

    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...
  16. 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)
  17. Replies
    14
    Views
    461

    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
  18. Replies
    13
    Views
    990

    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)
  19. Replies
    13
    Views
    990

    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)
  20. 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...
  21. 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...
  22. 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
    ...
  23. 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...
  24. Replies
    22
    Views
    1,032

    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....
  25. Replies
    22
    Views
    1,032

    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...
Results 1 to 25 of 31
Page 1 of 2 1 2