Search:

Type: Posts; User: Steve Cao

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    2,968

    How to play PCM buffer in windows?

    Well, I have a project that needs to be able to play PCM buffer data.I have tried many ways to realize it,but in vain.Any ideas?
  2. Replies
    3
    Views
    1,328

    ANS: (1)In char a[10] , a is a constant.So you...

    ANS:
    (1)In char a[10] , a is a constant.So you just can not assign "Hello" to it with "=".The second one "a" is a string pointer variable,so you can do it.
    (2)Well the string pointer "a" points to...
  3. Replies
    4
    Views
    1,828

    The variable "nam" must be a string array when...

    The variable "nam" must be a string array when you call gets() to initialize it.BTW, the variable "no" hasn't been initialized.
  4. Thread: strcat

    by Steve Cao
    Replies
    3
    Views
    1,387

    How about this: ssprintf(InvNoStr,"INVOICE...

    How about this:


    ssprintf(InvNoStr,"INVOICE NO:%s",InvNo);
  5. Replies
    1
    Views
    2,195

    Need help to do the big task

    Hi there,I AM STEVE.
    Well I need to write a program to realize the inter-process communication with message quque, but when I finished it, the program when running seems to be blocked or just cann't...
  6. Replies
    15
    Views
    3,702

    But I did try it. It worked.

    But I did try it. It worked.
  7. Replies
    15
    Views
    3,702

    It will work out fine, if you just insert the...

    It will work out fine, if you just insert the space into sscanf():



    sscanf("%d %15s %20s %f", &new->custId, new->Name, new->Surname, &new->accBalance);
  8. Replies
    12
    Views
    2,625

    the above error occurs in printf() funcitons.

    the above error occurs in printf() funcitons.
  9. Replies
    12
    Views
    2,625

    shirtnumber is the type of integer, not a string.

    shirtnumber is the type of integer, not a string.
  10. Replies
    12
    Views
    2,625

    "w+"means you can write and read the file.

    "w+"means you can write and read the file.
  11. Replies
    12
    Views
    2,625

    "w" means the file can only be wirtten.So you...

    "w" means the file can only be wirtten.So you need use "w+" to replace "w" in your first code.
  12. Replies
    12
    Views
    2,625

    There are two problems in your code. First, the...

    There are two problems in your code. First, the file you created in the first code han't be initialized, which meaned the file was empty. You shall need to call fprintf() funtion to initialize it...
  13. Replies
    4
    Views
    1,433

    Yeah!It is working now.But I want to run it in...

    Yeah!It is working now.But I want to run it in VB, then I did try . However, it is a pity that it didn't work.Why?
  14. Memloop is right!You should filter the '\n'....

    Memloop is right!You should filter the '\n'.
    Like this:


    do{
    ............
    }while(ch=='/n');
  15. Replies
    4
    Views
    1,433

    What's problem with this program?

    //it calculates the number of space/tab/enter key of the string you input from the keybord. But when I run it and input the string with "CTRL-Z" to end, nothing display on the dos screen. why??

    ...
  16. How about this:(//the program find the armstrong...

    How about this:(//the program find the armstrong number from 1 to 1000)



    for(num=1;num<1001;num++)
    {
    temp_num=num;
    sum=0;
    sprintf(str,"%d",temp_num);
    power=strlen(str);
  17. Select the do..while loop will be ok! int...

    Select the do..while loop will be ok!



    int flag=0;
    do
    {
    ...........
    if(a!=1&&a!=2&&a!=3)
    flag=1;
  18. //thanks Adak. place=10; while(number){ ...

    //thanks Adak.



    place=10;
    while(number){
    printf("%d\n",number%place);
    number/=place;
    }
  19. Thanks!Adak.

    Thanks!Adak.
  20. It is nothing.

    It is nothing.
  21. Replies
    11
    Views
    1,427

    For what popurse you use the fseek(), you want to...

    For what popurse you use the fseek(), you want to return the location or the number of characters?
  22. Replies
    11
    Views
    1,427

    fp must point to the undefined area.I suggest you...

    fp must point to the undefined area.I suggest you use the whence "SEEK_SET" which is easy to control.
  23. Take like these: number=575; printf("%d:...

    Take like these:

    number=575;
    printf("%d: %d\n",500,number/500);
    number%=500;
    printf("%d: %d\n",100,number/100);
    number%=100;
    printf("%d: %d\n",50,number/50);
    number%=50;
    printf("%d:...
  24. Generally, segmentation fault error is the cause...

    Generally, segmentation fault error is the cause of like these:
    the variable is out of control with forever addings.
    the pointer points to the wrong memery area.
  25. Replies
    4
    Views
    11,493

    To get the length of "test.txt" file: FILE...

    To get the length of "test.txt" file:
    FILE *stdin_stream=fopen("test.txt","r");

    // the file must exit and be initialized first in the current directory.

    fseek(stdin_stream,0,SEEK_END);...
Results 1 to 25 of 27
Page 1 of 2 1 2