Search:

Type: Posts; User: zcrself

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: sort question

    by zcrself
    Replies
    13
    Views
    1,160

    Dev-c++ 4.9.9.2 windows xp

    Dev-c++ 4.9.9.2

    windows xp
  2. Thread: sort question

    by zcrself
    Replies
    13
    Views
    1,160

    bool cmp1(string a, string b) { return...

    bool cmp1(string a, string b)
    {
    return a.length() <= b.length() && a < b;
    }
    int main()
    {
    std::vector<string> vec;
    vec.push_back("ab"); vec.push_back("b"); vec.push_back("aaa");
    ...
  3. Thread: sort question

    by zcrself
    Replies
    13
    Views
    1,160

    thanks for your suggestion!

    thanks for your suggestion!
  4. Thread: sort question

    by zcrself
    Replies
    13
    Views
    1,160

    I do appreciate your suggestion, thanks a lot ...

    I do appreciate your suggestion, thanks a lot



    bool cmp1(string a, string b)
    {
    if(a.length()==b.length())
    {
    return a < b;
    }else
  5. Thread: sort question

    by zcrself
    Replies
    13
    Views
    1,160

    aa aaa adfd dd

    aa aaa adfd dd
  6. Thread: sort question

    by zcrself
    Replies
    13
    Views
    1,160

    sort question

    #include <iostream>
    #include <algorithm>
    #include <vector>
    #include <string>
    using namespace std;
    int main()
    {
    std::vector<string> vec;
    vec.push_back("dd"); vec.push_back("adfd");...
  7. Replies
    23
    Views
    4,661

    Thanks a lot for a lot of senior programmers...

    Thanks a lot for a lot of senior programmers answering my questions eagerly.
    I learn C further for a newbie of C
  8. Replies
    23
    Views
    4,661

    Thanks for your answer so that I understand C...

    Thanks for your answer so that I understand C more clearly.
  9. Replies
    23
    Views
    4,661

    java language has try-catch function, what does...

    java language has try-catch function,
    what does C language has?

    Can "try-catch" function handle the error "segmentation fault"
  10. Replies
    3
    Views
    3,970

    how to get line number and column number

    #include <stdio.h>
    #include <stdlib.h>
    #include <ctype.h>
    typedef QUALITY int;
    #define PAIRENDLEN 2000
    void getSSnumber(char *input,QUALITY *snpCount)
    {

    //char buff[BUFSIZ];
    ...
  11. Replies
    23
    Views
    4,661

    Sometimes, when my program runs, there is a error...

    Sometimes, when my program runs, there is a error "segmentation error", but I don't know why and where is the error. I want to handle this error, but I don't know how to do handling.

    Do you...
  12. Replies
    23
    Views
    4,661

    I like this answer. It is better

    I like this answer. It is better
  13. Replies
    23
    Views
    4,661

    #include #include char* ...

    #include <stdio.h>
    #include <stdlib.h>
    char* fillData()
    {
    char *fd = (char*) malloc ( 100*sizeof(char));
    for ( int i = 0; i < 100; ++i )
    {
    fd[i] = 'A';...
  14. Replies
    23
    Views
    4,661

    thanks for your answer. It is good for me.

    thanks for your answer. It is good for me.
  15. Replies
    23
    Views
    4,661

    I see! my means is that how to test one data...

    I see!

    my means is that how to test one data structure whether be defined.( how to test the data which will be printed whether is out of memory )


    char *string = (char*) malloc (...
  16. Replies
    23
    Views
    4,661

    It's my mistake for starting multiple threads for...

    It's my mistake for starting multiple threads for the same question!
  17. Replies
    1
    Views
    1,434

    how can I write code to test a[100];

    I write some codes as follows:


    int main()
    {
    int a[2];
    a[0] = 1;
    a[1] = 1;

    return 0;
  18. Replies
    23
    Views
    4,661

    how can I write code to test a[100];

    I write some codes as follows:


    int main()
    {
    int a[2];
    a[0] = 1;
    a[1] = 1;

    return 0;
  19. Replies
    2
    Views
    856

    Is my function defintion right?

    typedef short int usint;
    /* malloc memory m line n column*/
    usint** ctArray(const int m,const int n)
    {
    usint** ptr;
    //usint* tmp;
    if( (ptr = (usint**) calloc (m,sizeof(usint*))) == NULL )...
  20. Replies
    3
    Views
    4,527

    Yes. 64 bit type here line 51: ...

    Yes. 64 bit type here

    line 51: fpHASH=fopen(argv[1],"w");

    gdb log


    [s@node6 ~]$ gcc -g -o patch patch.c
    [s@node6 ~]$ gdb patch
    GNU gdb Red Hat Linux (6.3.0.0-1.153.el4rh)
  21. Replies
    3
    Views
    4,527

    why can't access memory

    #include <stdio.h>

    #include <stdlib.h>

    #define B64_long long

    B64_long **limatrix(B64_long nrl,B64_long nrh,B64_long ncl,B64_long nch)
    {
    B64_long i,...
  22. Replies
    11
    Views
    1,579

    I can't understand your answer clearly

    I can't understand your answer clearly
  23. Replies
    11
    Views
    1,579

    program: #include #include...

    program:


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

    int getLineCount(char *input)
    {
    FILE *fp;int i = 0; char buf[100];
  24. Replies
    11
    Views
    1,579

    Yes.

    Yes.
  25. Replies
    11
    Views
    1,579

    while( fgets(buf,100,fp) != NULL ) { ...

    while( fgets(buf,100,fp) != NULL )
    {

    //char *x = fgets(buf,100,fp);
    i++;
    printf("%s\n",buf);
    //fputs(buf, fp);
    }
    ...
Results 1 to 25 of 169
Page 1 of 7 1 2 3 4