Search:

Type: Posts; User: lchunr

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,196

    Do you require the user to hit 'a', then press...

    Do you require the user to hit 'a', then press ENTER?
    Or when user press 'a', program immediately print out
    ADD RECORDS
    Enter [N]ame
    Enter [P]hone Number
    [R]eturn To Main Menu.....

    Perhaps...
  2. Replies
    3
    Views
    1,196

    > scanf("%c", &s1); //the first scanf Let's...

    > scanf("%c", &s1); //the first scanf
    Let's change to scanf("%d", &s1);
    if you declare s1 as int.

    Or you keep scanf, but change the declaration
    e.g. int name, number;
    e.g. char s1,s2;

    int...
  3. Replies
    0
    Views
    1,070

    Code Management Again

    How can I write the header file, when I include header file, I can use the function of inside lib.c?
    Can this lib.c compile to *.lib wihout any code added?
    How to avoid double call of header file?...
  4. Replies
    5
    Views
    1,010

    You can use _set_new_handler() to handle...

    You can use _set_new_handler() to handle allocation failure.




    #include <iostream>

    using namespace std;

    int Error_Handler()
  5. Thread: ? and :

    by lchunr
    Replies
    12
    Views
    1,233

    Perhaps you should avoid use of this operator,...

    Perhaps you should avoid use of this operator, e.g.


    array_index = (array_size > MAX_array) ? first_array_index : last_array_index;

    because you will get difficult to read and understand the...
  6. Thread: quit the loop?

    by lchunr
    Replies
    6
    Views
    1,807

    I've try getch() that the program wait for user's...

    I've try getch() that the program wait for user's input and cannot jump to
    puts("After get ESC"); if no one hit keyboard.
    How can I write an program that do not wait for user input?
    The program...
  7. Thread: quit the loop?

    by lchunr
    Replies
    6
    Views
    1,807

    quit the loop?

    How can I stop the loop when user enter ESC? When user enters ESC, the program prompts user for entering Y/N, if Y, stops the loop, otherwise, the loop continue.



    int i = 0;
    do
    {
    i++;
    //...
  8. Replies
    1
    Views
    2,346

    > Who generates the interrupt? I've to reprogram...

    > Who generates the interrupt?
    I've to reprogram the PC timer interrupt to 10ms?
  9. Replies
    1
    Views
    2,346

    How's interrupt handler?

    I've a control project that sends to and receives signal from electronics device via AD/DA card installed in PC computer. The CPU has to do many computations after receiving the signals. And the...
Results 1 to 9 of 11