Search:

Type: Posts; User: rusyoldguy

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    9
    Views
    452

    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...
  2. 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);
  3. Replies
    8
    Views
    508

    Take a look to: YouTube...

    Take a look to:
    YouTube
  4. Replies
    3
    Views
    440

    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:

    ...
  5. Replies
    6
    Views
    526

    May be this source could be useful: ...

    May be this source could be useful:



    #include <stdio.h>
    #include <stdlib.h>
    #include <limits.h>
    #include <float.h>
    int main(int argc, char** argv) {
  6. Replies
    8
    Views
    205

    Hallo Bryan_Teir° I think you should read...

    Hallo Bryan_Teir°

    I think you should read something about the header limits.h and float.h:
    C Library - <limits.h> - Tutorialspoint
  7. Replies
    5
    Views
    405

    Second example. Tells you when the digits before...

    Second example. Tells you when the digits before decimal points are not equal:


    int compdouble(double da, double db, int stellen)
    {
    int rewer = -1, nachint_a = 0, nachint_b = 0, i, faktor =...
  8. Replies
    5
    Views
    405

    Hallo gawiellus I think it may be better you...

    Hallo gawiellus

    I think it may be better you compare the two double values with given number of decimals where the values are compared.
    example:


    #include <stdio.h>
    #include <math.h>
  9. Replies
    10
    Views
    397

    Hallo shaswat! This way was one of the elder...

    Hallo shaswat!

    This way was one of the elder standards of c


    // Forward declaration of a function
    #include <stdio.h>

    void tom(void)
    {
  10. Example to encrypt and decrypt files with permutated numbers

    Here is a program were i wrote by my own with Qt for linux to encrypt and decrypt files.
    It based on transposition of bits. It splits a file into blocks of a length you can
    select between 64, 128,...
  11. Simple way to store a 64 bit unsigned long into four unsigned short with union

    Hi guys!

    Here is a simple program what shows how to store a 8 byte long unsigned long into 4 unsigned short:
    first the header lintunion.h:


    #ifndef LONGINTUNION_H_INCLUDED
    #define...
  12. Replies
    15
    Views
    766

    Hi Foxel! The normal characters of a string...

    Hi Foxel!

    The normal characters of a string are between 32(space) and 127.
    It is possible that some systems have an other length for different characters. See UTF8 by Wikipedia



    //converts...
  13. Example to show possible combinations of numbers

    Hallo san12345!

    May be there is an example for you. IO wrote it by my own.
    But the program is in german language.
    But i hope some parts of the program can help cou.
    There are three parts:

    1....
  14. Replies
    5
    Views
    338

    Hallo Ivory348 Look at line 5: for(x =...

    Hallo Ivory348

    Look at line 5:


    for(x = 0;x<cntr+1;cntr++) puts(keys[x]);
    [code]
    The integer 'x' has always the same content.
    It can't get bigger.
    The validity of 'x' is only for the...
  15. Replies
    2
    Views
    272

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

    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...
  17. Replies
    2
    Views
    366

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

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

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

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

    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;
  22. 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...
  23. Replies
    7
    Views
    583

    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...
  24. Replies
    7
    Views
    583

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