Search:

Type: Posts; User: scotdani

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    5,157

    Thanks for the help! As you mentioned, it's not...

    Thanks for the help! As you mentioned, it's not formal C so being able to recognize the basic format was the idea. I know some couples like to be surprised with the gender reveal which was the...
  2. Replies
    2
    Views
    5,157

    Just for fun: "Expecting" function

    Hello, coding aficionados! I've dabbled a bit in C during my academics and want to have some fun with writing a short function that sums up pregnancy. I'd then like to take that code snippet and...
  3. Replies
    1
    Views
    2,527

    Restricted floats for scanf

    I'm trying to use a scanf to get an input from the user of 2.1 or 2.2 to activate a function call and haven't found much to solve this.

    I'm using a float type and when I watch it stores as...
  4. Replies
    10
    Views
    5,923

    I've only had a small introduction to structs but...

    I've only had a small introduction to structs but I'll try this out.

    Changing that k variable to sizeof fixed the issue I was having before. So many ins and outs I need to remember!
  5. Replies
    10
    Views
    5,923

    Thanks for the help. This is working great, and...

    Thanks for the help. This is working great, and yes your assumption is correct. Now to brush up on passing arrays to functions.

    As I mentioned above, the numbers get math done to them.

    A...
  6. Replies
    10
    Views
    5,923

    [QUOTE=john.c;1277991]Try something like this:...

    [QUOTE=john.c;1277991]Try something like this:
    QUOTE]

    This is great! Would getting these values into an array be as simple as changing the declarations and putting this system into a for loop?
  7. Replies
    10
    Views
    5,923

    The data given is as follows: ...

    The data given is as follows:

    PART,3.00,+1,0.010,F
    PART,0.975,-1,0.025,V
    PART,2.00,-1,0.050,V
    GAP,0.000,0.080

    The starting word and last letter are identifiers, and the numbers get math done...
  8. Replies
    10
    Views
    5,923

    [QUOTE=john.c;1277984]Just use sscanf. QUOTE] ...

    [QUOTE=john.c;1277984]Just use sscanf.
    QUOTE]

    I forgot to mention this is reading from a .txt file. I'll post the loop.


    for (N=0; fscanf(fpin, "%s ",descriptor) != EOF; N++){
    ...
  9. Replies
    10
    Views
    5,923

    Tokenizing end of string to next line

    I'm having trouble getting a string tokenizing function to scan the last value of a string and proceed to the next line. This runs in a for loop to tokenize multiple lines.

    Example:...
  10. Replies
    28
    Views
    15,975

    Thank you. I will spend my time elsewhere.

    Thank you. I will spend my time elsewhere.
  11. Replies
    28
    Views
    15,975

    I certainly agree if I had the choice in the...

    I certainly agree if I had the choice in the curriculum. I'm just looking for help to get a good grade and attempt to understand it. I hold no shame in holding someones hand through the programming...
  12. Replies
    28
    Views
    15,975

    What I was thinking was how to pass pointers in...

    What I was thinking was how to pass pointers in main only compared to between main and a function. One of the assignment constraints is to scan for the variables in main then use a function for each...
  13. Replies
    28
    Views
    15,975

    Ok I'm starting to get it now. When using...

    Ok I'm starting to get it now. When using pointers in main, say if I took this function and place it in main, how different or similar would it look?
  14. Replies
    28
    Views
    15,975

    Look, I'm not interested in being belittled for...

    Look, I'm not interested in being belittled for my novice experience with C, and it was a timing issue that I did not immediately see your edited code.

    That being said, thank you for demonstrating...
  15. Replies
    28
    Views
    15,975

    Would I modify the prototype and definition to be...

    Would I modify the prototype and definition to be *a, *b,.. and the declaration and return be &a, &b,...? I'm thinking my printf's need the same &a treatment?
  16. Replies
    28
    Views
    15,975

    I made some progress in writing out the beginning...

    I made some progress in writing out the beginning of this program. I think this is where I need to start working on using pointer language. If I understand you're first response, I need a second...
  17. Replies
    28
    Views
    15,975

    Thanks for the resources. I will keep these in...

    Thanks for the resources. I will keep these in mind. Programming is definitely something that is still quite foreign to me but I definitely have gained appreciation for those that excel at it.
    ...
  18. Replies
    28
    Views
    15,975

    I do not have much going on yet since I have four...

    I do not have much going on yet since I have four weeks to finish it up. In general I don't know how to use pointers but even the prof said the purpose is to get us using these more regularly since...
  19. Replies
    28
    Views
    15,975

    Hopefully this works: 1. First,read this...

    Hopefully this works:

    1. First,read this document in its entirety. After reading this handout, you may optionallycreate a design sheet for the problem. Your design sheet should help youdetermine...
  20. Replies
    28
    Views
    15,975

    I think it's because the doc used Equation Editor...

    I think it's because the doc used Equation Editor and didn't translate well when I copied it. I'll repost shortly.
  21. Replies
    28
    Views
    15,975

    Below is the instructions for the program to be...

    Below is the instructions for the program to be written. The steps that specify call by reference with pointers are 4 and 7; it copied in funny. I'm suspecting there is going to be some sort of for...
  22. Replies
    28
    Views
    15,975

    Pointers and Call-by-reference functions

    I'm kicking off on another semester in C programming and one thing I have not been able to successfully wrap my head around is pointers, and then their employment in call-by-reference functions. Can...
  23. Replies
    21
    Views
    22,402

    I finally had success in getting this program to...

    I finally had success in getting this program to function. This stuff is not intuitive to me at all so little things were causing it to fail, such as having the array declaration stand alone from...
  24. Replies
    21
    Views
    22,402

    Ok I got a little guidance from the TA in the...

    Ok I got a little guidance from the TA in the class so it's better. But when I run it doesn't do anything. I honestly have no clue how to make this thing work and it's really driving my anxiety up...
  25. Replies
    21
    Views
    22,402

    I loaded your example here into my compiler,...

    I loaded your example here into my compiler, CodeBlocks 16.01, and it doesn't like the last for loop you wrote, line 181. Reading through it line by line I just got confused because I don't have a...
Results 1 to 25 of 29
Page 1 of 2 1 2