Search:

Type: Posts; User: rpbear

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    2,591

    I do agree with u ^_^

    I do agree with u ^_^
  2. Replies
    4
    Views
    2,591

    The problem is that dup will use the minimum...

    The problem is that dup will use the minimum unused file descriptor as the newly open file descriptor.However,without using dup2,how can I make sure that my function will use the specified file...
  3. Replies
    4
    Views
    2,591

    Implementation of dup2

    Hi all,I'm reading <Advanced programming in the UNIX environment>,that book asked the reader to implement a function which has same functions with dup2 without calling fcntl.Could anyone give me a...
  4. using stringstream will be easier: string...

    using stringstream will be easier:
    string sep,string1,string2;
    int int1;
    float float1;
    getline(file,str);
    istringstream ss(str);
    ss>>sep>>string1>>sep>>int1>>sep>>float1>>sep>>string2;
    then do...
  5. I understand.However,if I change the p's...

    I understand.However,if I change the p's value,the value of the list will change,I don't know why
  6. A question about the polynomial---impelemented with list

    Hi all.I wrote a program to impelement the add operation of polynomial with list.For example,I wanna do the add operation on
    x^2+3x^4+6x^5 AND x-5x^4+x^5-4x^6
    I creat two list,the input should be:...
  7. Replies
    4
    Views
    1,019

    find the bug

    replace the code
    re_w = re_w*W_RE - im_w*W_IM;
    im_w = im_w*W_RE + re_w*W_IM;

    with

    save_re = re_w;save_im = im_w;
    re_w = save_re*W_RE(len_x) - save_im*W_IM(len_x);
    im_w =...
  8. Replies
    4
    Views
    1,019

    thanks,I do use the Cooley-Tukey algorithm.I...

    thanks,I do use the Cooley-Tukey algorithm.I modified my code as you said,and the answer's still wrong,did u find any logical mistake in my code?
  9. Replies
    4
    Views
    1,019

    any hint?

    any hint?
  10. Replies
    4
    Views
    1,019

    wrong with my FFT program

    hi,all.I wrote this program to implement the FFT algorithm.Running with wrong answer.can anybody tell me what mistake i made?thanks!
    #include<stdio.h>
    #include<stdlib.h>
    #include<math.h>
    ...
  11. Replies
    5
    Views
    1,736

    agreed!

    agreed!
  12. Replies
    2
    Views
    1,331

    look at the end of the for,you add one ; that's...

    look at the end of the for,you add one ;
    that's a mistake caused by careless~~
  13. Thread: "##_##" means

    by rpbear
    Replies
    4
    Views
    1,731

    it means if #define a(x) 1##x and you ues...

    it means if
    #define a(x) 1##x
    and you ues printf to do this:
    printf("%d",a(34));
    it'll prodecu 134
  14. Replies
    5
    Views
    1,736

    this happened because you haven't init the...

    this happened because you haven't init the array----message[fileSize]
    add one line after that:

    memset(message,0,fileSize);
    second,you can't expect that the fread will read in char as much as...
  15. Replies
    2
    Views
    3,568

    try the code below #include...

    try the code below
    #include<stdio.h>
    #include<stdlib.h>

    int
    main(){

    FILE* fin = fopen("d:\\a.txt","r");
    long ld = 0;
  16. Replies
    10
    Views
    1,826

    maybe this one helps you s = "fsdf455";...

    maybe this one helps you


    s = "fsdf455";
    while(*s){
    if(isdigit(*s))
    printf("%c",(*s));
    ++s;
    }
  17. Replies
    5
    Views
    1,067

    the first one used as a initial expression of...

    the first one used as a initial expression of string,not just a pointer,which means it can't be use if not give it the space with malloc or somewhat else when you using it not as a initial...
  18. Thread: C Prog

    by rpbear
    Replies
    4
    Views
    1,681

    show a example

    #include<stdio.h>
    #include<stdlib.h>

    int
    main(){

    int i = 0x1;
    int n = 0,input = 0,output = 0;
    scanf("%d",&n);
    input = n;
Results 1 to 18 of 18