Search:

Type: Posts; User: franziss

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. because the input file is in binary format and it...

    because the input file is in binary format and it stores integer. I am reading in 4 bytes (size int) each time and store it in var c.

    the code works for me when the file is less than 4GB
  2. I tried createfile and readfile, it doesnt work...

    I tried createfile and readfile, it doesnt work for > 4gb files


    Char c;
    DWORD wmWritten;
    HANDLE a =CreateFile(result_file.c_str(),...
  3. Yes, the C and C++ IO libraries for your platform...

    Yes, the C and C++ IO libraries for your platform seems to choke on files larger than 4GB for 32 bit CPU because there is at most 2^32 memory address and > 4GB exceeded that.

    I also tried...
  4. Sorry, I don't really understand what you mean. I...

    Sorry, I don't really understand what you mean. I can use this code to open files or few hundred megabytes, this code is to count the number of lines in result_file, where each line is ended by a...
  5. Standard c or c++ functions does not work for a...

    Standard c or c++ functions does not work for a file size of 13gb.

    I use a simple code, and it can't even read the first line of the file. Each line in the input file is at most 100 characters

    ...
  6. but what if the file is given by someone else and...

    but what if the file is given by someone else and how do i cut them up into chunks?

    i am reading up on the internet now, seems like java is able to do this. but is c++ able to do this in linux...
  7. how to read in files that are bigger than 3gigabyte?

    I got a 18 gigabytes dataset, and I try using

    ipFile.open()

    and

    getline()

    to read in the data, but it has problems, as I am using 32bit microsoft visual studio 2005, and 18gigabytes...
  8. Replies
    17
    Views
    5,859

    you are right! now I don't my pointers to null,...

    you are right! now I don't my pointers to null, but my program still works fine. I don't know where is the bug, but the program is still working
  9. Replies
    17
    Views
    5,859

    you are right, but i was thinking of saving time...

    you are right, but i was thinking of saving time by not setting the pointers to NULL as I will definitely allocate memory to the pointers later. But nevermind, its better to be safe.
  10. Replies
    17
    Views
    5,859

    I solved my problem, I declared an array of...

    I solved my problem, I declared an array of pointers but I didn't initialize them to NULL. Then when I allocate memory to other arrays, somehow the uninitialized array of pointers is actually...
  11. Replies
    17
    Views
    5,859

    only here and Daniweb. Just curious, is there a...

    only here and Daniweb. Just curious, is there a competition between here and Daniweb? Like yahoo and google search engine?
  12. Replies
    17
    Views
    5,859

    oops... sorry guys, never knew there is this...

    oops... sorry guys, never knew there is this etiquette.

    I think I will keep this post as a warning for others in future who commit the same mistake as me.
  13. Replies
    17
    Views
    5,859

    Heap corruption detected. What does it mean?

    What does this error message mean? Thank you for your help

    Heap corruption detected at 0072FB10
    HEAP[algo.exe]: HEAP: Free Heap block 72fb08 modified at 72fb1c after it was freed
    Windows has...
  14. Replies
    4
    Views
    1,072

    oh man, you are GOOD! you are spot on. I think I...

    oh man, you are GOOD! you are spot on. I think I run out of file handles. Somewhere in my program, I didn't close another file pointer and all these file pointers accumulate.

    Thanks alot Salem and...
  15. Replies
    4
    Views
    1,072

    What could be the reasons? Is it possible that...

    What could be the reasons? Is it possible that there is memory corruption in my program? Or is it some applications is using result.txt?
  16. Replies
    4
    Views
    1,072

    Funny error in fopen

    I have a code


    FILE *opfile = fopen("output.txt", "w");


    and this code is in a function which is called more than hundred of times.

    And sometimes opfile == NULL, which I think is...
  17. Replies
    7
    Views
    3,719

    ok, i understand, thanks guys!

    ok, i understand, thanks guys!
  18. Replies
    7
    Views
    3,719

    is mod(%) efficient?

    I understand that using shifting bits to do multiplication is fast.

    but what a mod? is using the standard mod fast? can i do shifting bits to do mod?
  19. Replies
    4
    Views
    1,038

    ok, thanks a lot for guiding me, i found an...

    ok, thanks a lot for guiding me, i found an excellent article on this issue =)

    http://www.codeproject.com/cpp/PtrToPtr.asp
  20. Replies
    4
    Views
    1,038

    ok, i get it, i do this right? void...

    ok, i get it, i do this right?



    void cluster::function_B(int *&ptr_1, int *&ptr_2)
    {
    ptr_1 = ptr_2;
    }
  21. Replies
    4
    Views
    1,038

    How to point correctly?

    How do I make ptr_1 pointing to the same address of ptr_2 after function_B is called? I tried doing this, but after function_B exits, ptr_1 points back to NULL. Thanks!



    void...
  22. Replies
    23
    Views
    12,692

    ok, thanks for your advice! =) then what is...

    ok, thanks for your advice! =)

    then what is the difference if i'm using bitset or char? or either way works?
  23. Replies
    23
    Views
    12,692

    ok, i understand what you guys are explaining,...

    ok, i understand what you guys are explaining, thanks! it's my mistake, thanks for your help! =)
  24. Replies
    23
    Views
    12,692

    i'm using microsoft visual studio 2005, yes, t1...

    i'm using microsoft visual studio 2005, yes, t1 points to the same bitset as t2, but &t1 != &t2
  25. Replies
    23
    Views
    12,692

    you are right in saying t1 is pointing to t2, but...

    you are right in saying t1 is pointing to t2, but go and check &t1 and &t2,
    they are of different memory allocation, this is the weakness of bitset. you can only point to t2 but what if you want to...
Results 1 to 25 of 163
Page 1 of 7 1 2 3 4