Search:

Type: Posts; User: psppb

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,623

    I have just been searching for 'left' and I...

    I have just been searching for 'left' and I cannot find anything

    Thanks
  2. Replies
    3
    Views
    1,623

    cannot get strstr to work properly

    I am unable to get the string seaching function to work. it always says "Nothing found" I am stumped. Any hints ?

    Thanks

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

    char tracks[][80] = {
    ...
  3. Thread: const vs Extern

    by psppb
    Replies
    3
    Views
    1,303

    I was taken and sent to china for a production...

    I was taken and sent to china for a production issue for four months :(
  4. Thread: const vs Extern

    by psppb
    Replies
    3
    Views
    1,303

    const vs Extern

    What is the difference between extern struct and a const struct or any variable for that matter.

    Thanks (I'm on sort of a crash course in C for work)
  5. Replies
    4
    Views
    1,739

    works in the book but not in my compiler

    I am learning to program and this program is suppost to work in the book but it will not find anything. I'm stumped
    Thanks


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


    char tracks[][80] = {...
  6. Replies
    4
    Views
    906

    Yes, This is exactly my problem :) I apologize...

    Yes, This is exactly my problem :) I apologize but there is a skill to asking good questions on this forum and I have yet to master it. I do appreciate your attempts to figure out what I need very...
  7. Replies
    4
    Views
    906

    clearing a variable

    Is there a way to reset a char variable?

    I have a getchar() statement that I use over and over to dictate which leg of a switch statement I dive into. I need to clear the variable so that time I...
  8. Replies
    8
    Views
    901

    I need the program to stop and make the user...

    I need the program to stop and make the user input something. the default of zero is making it not prompt any input and running to the end

    Thank you!
  9. Replies
    8
    Views
    901

    int choice; char Col_line[100]; ...

    int choice; char Col_line[100];
    printf("How Much? \n");

    fgets(Col_line, sizeof(Col_line), stdin);
    sscanf(Col_line, "%d", &choice);
    ...
  10. Replies
    1
    Views
    962

    Using multiple files

    I am using Bloodshed Dev C++ and writing source files. How do I get a project that is composed of multiple files to compile into one .exe file?
    my source file programs are getting very long

    Thanks
  11. Replies
    8
    Views
    901

    forcing user input

    Hello,

    I have several input prompts in my code but the default of zero keeps making the code run right through the prompts. How do I clean out the input and make the user change the value so the...
  12. Replies
    14
    Views
    9,166

    Yes I go into the function and it runs right...

    Yes I go into the function and it runs right through to the main function without stopping or asking for any input
  13. Replies
    14
    Views
    9,166

    I'm actually not even given an opportunity to...

    I'm actually not even given an opportunity to enter a char
  14. Replies
    14
    Views
    9,166

    I added break and it still flew right through

    I added break and it still flew right through
  15. Replies
    14
    Views
    9,166

    void The_buy( double...

    void The_buy( double *my_money_ptr,
    int *my_c_units_ptr,
    int *my_h_units_ptr,
    int *my_r_units_ptr,
    ...
  16. still cannot generate a random number between 0 and 1

    It was recommended that I try this:
    double price = 30000 *rand() % 1;

    But that keeps giving me zero every time? Am I missing something?

    Thanks
  17. Replies
    14
    Views
    9,166

    skipping switch statement

    Greetings,

    I am having a problem with a function skipping over my switch statement and going right to the default. I have a getchar() statement but it rolls right through. Can anyone tell me why?...
  18. Grumpy, I understand and am sorry to disgust...

    Grumpy,

    I understand and am sorry to disgust you. It's from an old game on my calculator. Thank you for your help.
  19. Passing arg 1 of function makes integer from pointer without a cast

    Greetings, Still working on the pointer thing in my silly game. I get a warning : Passing arg 1 of 'Drug_buy' makes integer from pointer without a cast this is in the first call of the function...
  20. Getting user input into program in the form of int or char

    I need help getting user input this is the best I can think of:

    int drug_choice_selection;
    char drug_choice[100];
    printf("How Much? \n");

    ...
  21. float x = (1000 *rand() % 100)/100; Gives me a...

    float x = (1000 *rand() % 100)/100; Gives me a zero with nothing behind the decimal it compiles but I cannot figure out what is wrong with this

    Thanks
  22. Good point perhaps a float then... or double?? ...

    Good point perhaps a float then... or double??

    Thanks

    Bill
  23. I entered 1 and Bang...... Show's over

    I entered 1 and Bang...... Show's over
  24. Generate a random number between zero and one that is positive.

    I cannot find a decent example online about creating a random number that is between 0 and 1 and is positive. So far I've tried

    rand() %1 but this hasn't yielded any good results

    Thanks
  25. X.exe has stopped working, Windows is checking for a solution to the problem

    My code compiles fine but whenever I run it I get a popup window that states DW.exe has stopped working, Windows is checking for a solution. What could be causing this? I cannot trouble shoot this...
Results 1 to 25 of 28
Page 1 of 2 1 2