Search:

Type: Posts; User: Structure

Page 1 of 14 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    363

    int x = 1; printf( "%d %d %d\n", ++x, x, x++...

    int x = 1; printf( "%d %d %d\n", ++x, x, x++ );"there is absolutely no guarantee that this order would be used in any other environment, in the same environment with different options selected, or...
  2. Replies
    8
    Views
    476

    Utah teapot - Wikipedia...

    Utah teapot - Wikipedia
    Graphics pipeline - Wikipedia
    Polygon mesh - Wikipedia
  3. Replies
    16
    Views
    607

    This one includes integer fractions ... ...

    This one includes integer fractions ...



    int isNumber( char *string ) {
    int oneDot = 0, stringLength = strlen(string), ii;
    for (int i=0; i<stringLength; i++) {
    ii =...
  4. Replies
    16
    Views
    607

    preemptive fix... int isNumber( char...

    preemptive fix...



    int isNumber( char *string ) {
    int oneDot = 0;
    for (int i=0; i<strlen(string); i++) {
    if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
    //...
  5. Replies
    16
    Views
    607

    int isNumber( char *string ) { int oneDot =...

    int isNumber( char *string ) {
    int oneDot = 0;
    for (int i=0; i<strlen(string); i++) {
    if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
    // valid digit ;
    }...
  6. Replies
    16
    Views
    607

    int isNumber( char *string ) { int oneDot =...

    int isNumber( char *string ) {
    int oneDot = 0;
    for (int i=0; i<strlen(string); i++) {
    if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
    // valid digit ;
    }...
  7. Replies
    16
    Views
    607

    #include #include int...

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

    int isNumber( char *string ) {
    for (int i=0; i<strlen(string); i++) {
    if ( (int)string[i] >= 48 && (int)string[i] <= 57 ) {
    //...
  8. Replies
    6
    Views
    518

    multiply the identity matrix by the scalar. ...

    multiply the identity matrix by the scalar.

    "The term scalar multiplication refers to the product of a real number and a matrix. In scalar multiplication, each entry in the matrix is multiplied by...
  9. Replies
    1
    Views
    207

    this might help... #include ...

    this might help...



    #include <stdio.h>

    void primoultimopari(char list[], int dimensione, int *prima, int *ultima) {
    *prima = -1;
    *ultima = -1;
    for (int i=0; i<dimensione;...
  10. I can understand this, but why include an entire...

    I can understand this, but why include an entire library for one function?
    Although i used strlen, i'm saying it could be useful sometimes to create the one function you need.
  11. 16198 16199

    16198

    16199
  12. considering what this code does, this is...

    considering what this code does, this is disturbing.

    16197
  13. also i believe when you do this: ...

    also i believe when you do this:

    packetBuffer[len] = 0;
    you actually want do do this:

    packetBuffer[len-1] = 0;
    also, you are going to want to zero terminate both strings.
  14. printf( "[%s]", packetBuffer ); if you don't...

    printf( "[%s]", packetBuffer );

    if you don't see [101_idle] but you see [101_idle(+ some other bs)] ;

    that could be your comparison problem.
  15. Where you commented out the comparison, print out...

    Where you commented out the comparison, print out the buffer to the console to see what it actually recieves.
  16. I'm looking at your code... go back to what...

    I'm looking at your code...

    go back to what you had i have a better idea of what you are trying to do.
  17. #include #include const...

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

    const char *isAvailable = "_available";
    const char *notAvailable = "_disabled";

    char tables[10][32];

    void enableTable( int table ) {
    strcpy(...
  18. ok, this is what i would do... compile this as a...

    ok, this is what i would do... compile this as a seperate program and take a look at it... give me a min.
  19. add this as a function above main() int...

    add this as a function above main()



    int compare( char *string1, char *string2 ) {

    if ( strlen(string1) != strlen(string2) ) {
    return 2;
    }
  20. it's expecting a char and you are trying to set...

    it's expecting a char and you are trying to set it to a string of chars.
    That's why i added the pointer *.


    char *situationOne = "_available";

    same for the function, change char to char *

    ...
  21. :confused:

    :confused:
  22. you could also return 2 if they are are not the...

    you could also return 2 if they are are not the same length.
    This way you can find out if you have trailing bytes at the end or beginning.



    int compare( char *string1, char *string2 ) {
    ...
  23. #include #include char...

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

    char *string = "string one";
    char *other = "string one";

    int compare( char *string1, char *string2 ) {
    if ( strlen(string1) != strlen(string2)...
  24. maybe try a byte to byte comparison ? i.e:...

    maybe try a byte to byte comparison ?

    i.e: instead of using strcmp(), compare:
    for (x++) { if string[x] == other[x] }
  25. Replies
    5
    Views
    408

    #include #include char...

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

    char *testText = "word flip function";

    void flipPrint(char *text) {
    int sLength = strlen(text);
    int this = 0, last = -1;
    for (int i = 0; i...
Results 1 to 25 of 342
Page 1 of 14 1 2 3 4