Search:

Type: Posts; User: Ryan Huddo

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    3,127

    Roger, thanks for the help guys, as usual its...

    Roger, thanks for the help guys, as usual its greatly appreciated.

    Hopefully in the near future I can shed light on topics myself :)
  2. Replies
    13
    Views
    3,127

    Yeah I have but I don't always understand it all...

    Yeah I have but I don't always understand it all - comes with learning.
    for example, although I went through the link above but I am still not sure how to use usleep;



    #include <unistd.h>...
  3. Replies
    13
    Views
    3,127

    Cheers mate, I will change the array around, I am...

    Cheers mate, I will change the array around, I am just a bit confused with calling srand() once and then using the numbers generated to be assigned to an array without a loop (and in turn re-calling...
  4. Replies
    13
    Views
    3,127

    Jim: #include #include...

    Jim:



    #include <stdio.h>
    #include <ctype.h>
    #include <stdlib.h>
    #include <time.h>
    #include <unistd.h>
  5. Replies
    13
    Views
    3,127

    I call a function that uses srand, but the...

    I call a function that uses srand, but the function that is called multiple times in a loop while assigning an array, give me a sec I will post a simplified version to show you what I mean. Given...
  6. Replies
    13
    Views
    3,127

    Thanks, I tried this but I am obviously doing...

    Thanks, I tried this but I am obviously doing something wrong;



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

    unsigned int usecs;

    int main(void)
  7. Replies
    13
    Views
    3,127

    sleeping in linux OS without a loop

    Hey guys,

    Another simple question. I am generating random numbers using time.h, but obviously I need the time to elapse a small amount between each number generated to avoid the same number being...
  8. Replies
    2
    Views
    849

    Thank you, I knew there was something simple I...

    Thank you, I knew there was something simple I was missing :)
  9. Replies
    2
    Views
    849

    using != with isalpha

    for (int i = 0; i < strlen(argv[1]); i++) {
    if (isalpha(k[i]))
    {
    }
    else {
    printf("Error 2\n");
    return 1;
    ...
  10. Replies
    15
    Views
    2,331

    Yeah sorry i over looked I was using a #include...

    Yeah sorry i over looked I was using a #include file for GetString, migf1 is correct its from the CS50 CSE.


    No worries I will thanks.

    Again thanks, I will fix this.

    I start the count at 1...
  11. Replies
    15
    Views
    2,331

    Just letting everyone know I figured it out, I...

    Just letting everyone know I figured it out, I don't completely understand it and if someone wants to explain it to me please feel free, but working code as follows;


    int main(void){
    string...
  12. Replies
    15
    Views
    2,331

    Ahhh, makes so much sense, haha learning curb. :)

    Ahhh, makes so much sense, haha learning curb. :)
  13. Replies
    15
    Views
    2,331

    Ah well that answers that issue, that brings me...

    Ah well that answers that issue, that brings me back to the first set of code i wrote, essentially:



    // GetString
    // for loop to find spaces
    // - allocate spaces into an int
    // use value to...
  14. Replies
    15
    Views
    2,331

    I don't mean to insult anyones intelligence...

    I don't mean to insult anyones intelligence because your all obviously good at this but regardless I will comment on lines to indicate my intent.


    /*
    When running this I am simply running it as...
  15. Replies
    15
    Views
    2,331

    I should add I am trying to use an unassigned...

    I should add I am trying to use an unassigned array and it will only increase as required using the above code appose to using a loop to detect how many places I need to allocate the array......
  16. Replies
    15
    Views
    2,331

    *argv[x] = input[i + 1]; Am i wrong assuming I...

    *argv[x] = input[i + 1];

    Am i wrong assuming I can use x to place the character in that position of the array?
    x is declared earlier in the program and as you can see it increases by one if that...
  17. Replies
    15
    Views
    2,331

    Segmentation fault (core dumped)

    This is doing my head in and I have been at it for hours. I have googled with no luck. tried different loops again no joy.

    I have done what I need to do however without using an array, its messy...
  18. Replies
    9
    Views
    9,337

    Na I am to pro to read Tutorials, :P Kidding,...

    Na I am to pro to read Tutorials, :P Kidding, thanks I will start reading post hitting the "post Quick Reply" button.

    Thanks again, Ryan
  19. Replies
    9
    Views
    9,337

    While I have you here, could I please get some...

    While I have you here, could I please get some help with using structured recording with if statements?

    No change to my other code however I am trying to use struct instead of individual char as...
  20. Replies
    9
    Views
    9,337

    AHHHHHHH Thanks guys but I figured it out, dont...

    AHHHHHHH
    Thanks guys but I figured it out, dont understand it but it works..

    getchar();


    } if (keyWaterfeatures == 3) { printf("What is the name of the 1st key water feature?\n");...
  21. Replies
    9
    Views
    9,337

    To be honest I dont know what hhd is used for,...

    To be honest I dont know what hhd is used for, the program I am using recommended it, when I was using %s it just crashed.



    No error messages with the following;



    char kwf1[20];
  22. Replies
    9
    Views
    9,337

    No input until this section whats so ever, the if...

    No input until this section whats so ever, the if statement determines how many 'Key water features' and then runs the appropriate lines based on the input (in this example its 3 obviously) and thats...
  23. Replies
    9
    Views
    9,337

    Skipping a fgets input required by user?

    Hey guys,

    I have a series of questions within an if statement. For what ever reason the very first fgets gets skipped.



    if (keyWaterfeatures == 3) {
    printf("What is the name of the...
  24. Thread: fgets

    by Ryan Huddo
    Replies
    9
    Views
    1,255

    Thanks, I didnt know that fgets did that but...

    Thanks, I didnt know that fgets did that but makes since, works how I intended now :)

    Thanks again, Ryan
  25. Thread: fgets

    by Ryan Huddo
    Replies
    9
    Views
    1,255

    OR just simply not create a new line after each %s

    OR just simply not create a new line after each %s
Results 1 to 25 of 38
Page 1 of 2 1 2