Search:

Type: Posts; User: jk81

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: deqeue

    by jk81
    Replies
    1
    Views
    996

    deqeue

    M.BM has number of items in inventory, and Q.front->BM has number of items user wants. After run this function M.BM should subtract number of items that user wants.
    but, after run this function my...
  2. Replies
    15
    Views
    14,065

    now..

    now it takes ch but... skips scanf("%c", &name) before ch=getchar()
    I tried to use gets, fgets instead of scanf, but same result.

    Output:
    Enter Firstname: <- skips Scanf and goes to getchar()...
  3. Replies
    15
    Views
    14,065

    still..

    scanf("\n%c", &variable> worked for other function..
    but this function skips scanf again~!!!
    when I used fflush(stdin), it worked on visual C++, but didn't work with other compilers.
    I also tried...
  4. Thread: dequeue

    by jk81
    Replies
    2
    Views
    1,640

    dequeue

    the character value stores a name of user and the j stores his/her age.
    those two things stored in queue.
    I need to pop first data in queue and display them to the screen.
    but I can not figure out...
  5. Replies
    15
    Views
    14,065

    my program skips scanf and getchar()

    this function suppose to get input from user and go to correct case and calculate number of items. but It skips user input and keeps says invalid input.

    This is my output looks like:
    1. Big Mac,...
  6. Thread: delete

    by jk81
    Replies
    1
    Views
    926

    delete

    this delete function suppose delete a character stored in linked list. but it gives me error on buffer=buffer->cursor->next; code.




    void DeleteCharacter(bufferT buffer)
    {
    position ptemp;
  7. Thread: going backward

    by jk81
    Replies
    2
    Views
    966

    going backward

    this function suppose to move cusor to one space backward, but it gives me error. it compiles, but would not run...

    definitions


    typedef struct node{
    char chdata;
    struct node *link;
    ...
  8. Replies
    4
    Views
    941

    the input2 is global variable, it suppose to take...

    the input2 is global variable, it suppose to take rest of characters in array. Since input[0] has first character to tell what to do, I want to copy characters other than input[0] to input2.
  9. Replies
    4
    Views
    941

    problems in decoing userinput

    the function decode input suppose to copy first letter of array to character c and then copy rest of array to character array input2.
    but it copies first letter to c, but it does not copy rest of...
  10. Thread: Switch

    by jk81
    Replies
    1
    Views
    1,169

    maybe decoding again?

    hmm....
    maybe decoding causes the error??
    but the O works fine though..
    still don't get it why this program display "segmentation fault(core dumped) error"



    /* Decode User Input */
    void...
  11. Thread: Switch

    by jk81
    Replies
    1
    Views
    1,169

    Switch

    This function should get input c then call correct function.
    but only thing works is displayoption with character O.
    I though I might wrote function call wrong, but the Q(quit) is not working...
  12. Thread: Decoding

    by jk81
    Replies
    4
    Views
    1,792

    char userinput[100]; gets(userinput); if...

    char userinput[100];

    gets(userinput);


    if gets(userinput) is wrong, then which function should I use?
    scanf?
    getch?
  13. Thread: Decoding

    by jk81
    Replies
    4
    Views
    1,792

    Decoding

    this function should find out the first element of array is an interger or a character, then store that element to character named C. but it does not do that..
    What can be wrong?

    this is my input...
  14. Thread: count...

    by jk81
    Replies
    1
    Views
    1,039

    count...

    is there C command that counts number of characters in a character array or string?

    or do I have to create a function that counts number of characters in an array or a string?
  15. Replies
    2
    Views
    1,448

    recursive function problem

    this function supposed to open all empty spaces..
    but it does not work properly..




    void openemptyspace(int x, int y)
    {

    /* Declarations */
  16. Thread: debug...

    by jk81
    Replies
    2
    Views
    1,168

    i reduced the code above.. sorry about that.. i...

    i reduced the code above..
    sorry about that..
    i narrowed down to those two functions..

    I found another problem: calculating portion does not work..
  17. Thread: debug...

    by jk81
    Replies
    2
    Views
    1,168

    debug...

    can't figure out what's wrong with this program...
    it's minesweeper program..
    input of (0, 0) is automatic win...
    if I uncover some area that doesn't have mines, it opens all area.
    can't figure...
  18. Thread: minesweeper...

    by jk81
    Replies
    1
    Views
    2,719

    minesweeper...

    how can I make a function to calculate number of mines near by?
    I wrote as this.. but it does not work properly.



    int calculate()
    {
    int sum = 0;
    int i;
    int j;
  19. Replies
    6
    Views
    880

    i used stopper like this ...

    i used stopper like this



    if(addressbook[i].name == 0)
    break;

    but it does not work..

    here's rest of my list function.
  20. Replies
    6
    Views
    880

    hmm..

    it still prints entries to screen, even though it's entry is empty.
    how can I make it to stop, when there's no entry?
  21. Replies
    6
    Views
    880

    one last function..

    how can i make this function to stop after displaying 5 entries then resume displaying next 5 entries?



    void listphonebook() /* List data */
    {
    int i=0;
    char ch;

    for(i=0;i<=...
  22. Replies
    4
    Views
    912

    /* Structure */ struct entry { char name[30];...

    /* Structure */
    struct entry
    {
    char name[30];
    char phoneNo[12];
    char email[20];
    };

    /* Global declaration*/
    struct entry addressbook[100];
  23. Replies
    4
    Views
    912

    delete or replace..

    this delete function suppose replace current array to last array.
    but it gives me error message that
    "incompatible type in my assignment"
    is there some way to replace string?
    i tried strcpy.....
  24. Thread: search()

    by jk81
    Replies
    2
    Views
    871

    thanks it works now.

    thanks it works now..
  25. Thread: search()

    by jk81
    Replies
    2
    Views
    871

    search()

    now getinput works fine..
    but search() doesn't work..
    if values: n = jk
    addressbook[1].name = jk
    then it should return index number..
    but if statement, and go to return -1.
    What can it be...
Results 1 to 25 of 32
Page 1 of 2 1 2