Search:

Type: Posts; User: rusyoldguy

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    10
    Views
    1,679

    Hallo john.c With the string "ababa" according...

    Hallo john.c

    With the string "ababa" according the formula of Leonhard Euler
    you would got 10 possible permutations.
    The string have a length from 5 characters.


    I think for the first time...
  2. Replies
    5
    Views
    1,069

    Hi Syazzz here an example to write ONE set of...

    Hi Syazzz

    here an example to write ONE set of details:




    typedef struct details
    {
    char plateNo[50];
  3. Replies
    5
    Views
    1,069

    Hallo, Salem is right, you can use ...

    Hallo,

    Salem is right, you can use


    scanf("%49[^\n]", b.plateNo);


    This line reads all character including the space(ASCII 32dec)
    The number 49 limits the length of the input to 49...
  4. Replies
    10
    Views
    1,679

    calculate permutations

    Hallo Salem!

    To calculate the number of Permutations with 2 elements in a class is with the Forumula of Euler:


    n = { (a+b)! /(a! *b!)}

    If a string is "aabaa" you have
    element_1 = a = 4...
  5. One more thing: If you want to turn axis like...

    One more thing:

    If you want to turn axis like

    1 2 3 4 5 6 7 8 9

    from

    1 2 3
    4 5 6
  6. Hallo! I think, he can use union to make it...

    Hallo!

    I think, he can use union to make it easier:


    #include <stdio.h>

    void initArray(int (*array)[], int n, int init)
    {
    for (int slei = 0; slei < n; slei++)
  7. Hi shloa4! It sounds like working with the...

    Hi shloa4!

    It sounds like working with the normal distribution. In Europe the control limits are by 99 Percent(2.575829 sigma), the warning limits are by
    95 percent(1.95996398 simga) distance to...
  8. Replies
    4
    Views
    1,610

    Hallo Alogon! If you use gcc see this page: ...

    Hallo Alogon!

    If you use gcc see this page:

    atoi(3): convert string to integer - Linux man page

    see for this:
    int atoi(const char *nptr);
    long atol(const char *nptr);
    long long...
  9. Replies
    3
    Views
    1,141

    May be you need to have root Permissions to use...

    May be you need to have root Permissions to use usb-devices.
    For example if you want to use an usb-stick with windows emulated on qemu-kvm
    you need first to login as superuser.
    Then, start...
  10. Replies
    3
    Views
    694

    other example: /* getchar example :...

    other example:


    /* getchar example : typewriter */
    #include <stdio.h>

    int main(int argc, char **argv)
    {
    int c;
    puts ("Enter text. Include a dot ('.') in a sentence to exit:");
  11. Replies
    3
    Views
    694

    Hallo bos1234! I hope this code can help you,...

    Hallo bos1234!

    I hope this code can help you, ignore the german comments.


    /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
    /*
    * main.cc
    *
    * chkkeystroke is...
  12. Sorry forgot didi.h: #ifndef LI_H_...

    Sorry forgot didi.h:



    #ifndef LI_H_
    #define LI_H_ 2

    extern struct StudentData
    {
    char name[25];
  13. Hi davic01! Here an example: first student.h:...

    Hi davic01!

    Here an example:
    first student.h:


    #ifndef STUDENT_INC_
    #define STUDENT_INC_

    #include <iostream>
  14. Hallo laserlight! I think with asentence he...

    Hallo laserlight!

    I think with asentence he means something like that:
    "good wine needs no bush"
    or
    "the bread never falls but on its buttered side"

    The first letter into uppercase:
    "GOOD...
  15. Replies
    3
    Views
    1,035

    Or see this example. /** opnclose.c */...

    Or see this example.



    /** opnclose.c */
    #include <stdio.h> /* printf, fopen, fclose */
    #include <stdlib.h> /* exit */

    #define READ "r"
  16. Replies
    12
    Views
    2,453

    binary 11 is 3 decimal uint8_T is an integer...

    binary 11 is 3 decimal

    uint8_T is an integer type with 8 bit length. The Data type unsigned char is also 8 bit long If you take int(32bit). for this example i think it doesn't matter anything....
  17. Replies
    12
    Views
    2,453

    Hallo Brian_Teir! I think it would be better...

    Hallo Brian_Teir!

    I think it would be better to know from what for a side you want do start to split the whole sentense "rxbuffer" into 8-byte-strings.
    In your example you have 4 times with 50...
  18. Thank You! Now it works! I think i had...

    Thank You!

    Now it works!

    I think i had Tomatoes on the eyes!
    He who makes no mistakes makes nothing.
  19. Here a call with given argument: 1608216082

    Here a call with given argument:
    1608216082
  20. sorry, my fault.# In the original code i used ...

    sorry, my fault.#

    In the original code i used

    int argc

    What i don't understand is, when i call the programm without any argument it crashes in FreeDOS.
    The same EXE works fine if i call it...
  21. Programm in Freedos and djgpp chashes when using commandline paramters

    Hallo guys!

    I have tried just for fun to work with FreeDOS 1.2 and djgpp to write some
    programs in c.
    But when i try to access arguments argv[] from (example)



    int main(it argc, char...
  22. Replies
    9
    Views
    2,833

    By your first example you need to include...

    By your first example you need to include
    #include <string.h>
    After this change i've got 1 as return value of strcmp too.

    jimblumberg's exampe returns 49 of strncmp. That's the ASCII-Value of...
  23. May be this example can help you: #include...

    May be this example can help you:


    #include <iostream>
    #include <math.h>

    struct tbl
    {
    std::string cmdtxt;
    double (*funki)(double a);
  24. Replies
    8
    Views
    2,030

    Take a look to: YouTube...

    Take a look to:
    YouTube
  25. Replies
    3
    Views
    783

    Hallo muhammetekurt! Salem is right, this code...

    Hallo muhammetekurt!

    Salem is right, this code is terrible.
    The only way to delete goto is to swap out some code to functions:
    Like to change your example to this:

    first hungarian.h:

    ...
Results 1 to 25 of 66
Page 1 of 3 1 2 3