Search:

Type: Posts; User: avi2886

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    2,459

    Hi guys, Thank you, both of you for...

    Hi guys,

    Thank you, both of you for your answers.
    @iMalc: I actually did find this paper. But I guess I was just too intimidated by the size of it and hoped I would get a simpler answer...
  2. Replies
    3
    Views
    2,459

    A doubt about precision in Floats

    Hi,

    I ve a nagging question that I have been unable to figure out. From what I understand,
    floats have a precision of 6 digits. And this is supposed to be 6 digits in total, not just 6 digits...
  3. Replies
    4
    Views
    5,128

    dwks.. U re awesome!!.. :) It works now.. Thanks...

    dwks.. U re awesome!!.. :)
    It works now.. Thanks a ton. I was quite lost back there..

    So am I right in understanding that, with qsort, u should cast the variables inside the compare function into...
  4. Replies
    4
    Views
    5,128

    Q sorting a 2D array

    Hi,

    I am trying to q-sort an 2D array containing 2 columns of floats. The array must be sorted on the basis of any one of the columns.

    This is the code that I wrote..




    int compare(...
  5. Replies
    14
    Views
    16,076

    I haven't worked with the fpos_t datatype before....

    I haven't worked with the fpos_t datatype before. Does it store the position in bytes? I mean if I wanted to move to a certain bytes away from the current position, how should I increment the...
  6. Replies
    14
    Views
    16,076

    Thanks for the quick reply brewbuck. I am doing...

    Thanks for the quick reply brewbuck. I am doing my developing on Windows using VC++. Do you happen to know how to get fseeko64() in VC++ environment..? Or do u know of any alternatives that I can use...
  7. Replies
    14
    Views
    16,076

    Hi all, Sorry to be reporting to an...

    Hi all,

    Sorry to be reporting to an old thread. But I just realised that the problem that I announced as having been fixed above was actually not properly fixed. The issue was that I was...
  8. Replies
    14
    Views
    16,076

    I fixed the integer overflow and it works fine...

    I fixed the integer overflow and it works fine now.! Thanks for the help guys..
    Posting my code here incase anyone is interested..



    int max_fseekrow;

    int start_row=18375, n_cols =2960,...
  9. Replies
    14
    Views
    16,076

    Oh.. never thought about that. So the problem is...

    Oh.. never thought about that. So the problem is that fseek defines its offset to be a signed integer. And my number is an invalid signed integer.. Makes sense.

    I guess I ll ve to use a...
  10. Replies
    14
    Views
    16,076

    fseek failing - Error: Invalid argument

    Hi all,

    I have a file consisting of a huge array of floats written in binary mode (fwrite). Its actually a contiguous 2D array. I need to access various parts of the array and for this I...
  11. Replies
    15
    Views
    2,865

    Unless your file runs to tens of GB, you...

    Unless your file runs to tens of GB, you shouldn't have a problem opening it at once. Atleast as far as I know..

    Open the file and fgets in a loop to get one line after another..

    Standard C...
  12. Replies
    8
    Views
    2,492

    Yes.. Got it now. Thanks for the explanation. ...

    Yes.. Got it now. Thanks for the explanation. Cheers..
  13. Replies
    8
    Views
    2,492

    Oh.. Tat works!. Thanks a ton for the help.. Not...

    Oh.. Tat works!. Thanks a ton for the help.. Not being able to figure that out was driving me nuts.

    So.. the problem was that when I just return the difference between 2 numbers, sometimes the...
  14. Replies
    8
    Views
    2,492

    @Matsp: Sorry bout that.. My bad. But fixing that...

    @Matsp: Sorry bout that.. My bad. But fixing that typecast to

    int a1 = (int) (* (float *) a) doesn't mean to make much difference. I still get the same output. Btw, if I assign a float to an...
  15. Replies
    8
    Views
    2,492

    Problem when qsorting an array of floats

    Hi,

    I am trying to qsort an array of floats and for some reason I am not getting the proper results. I am posting my code here. Could any of you take a look and tell me what I am missing.

    ...
  16. Replies
    7
    Views
    1,198

    Ok.. So basically what you are saying is that the...

    Ok.. So basically what you are saying is that the open mode doesn't really matter and what does is actually whether I use fprintf() or fwrite() to write it into the file.. That makes sense.. cos we...
  17. Replies
    7
    Views
    1,198

    Thanks for the replies guys.. One point I forgot...

    Thanks for the replies guys.. One point I forgot to mention was that the file is created using another program which I wrote. After seeing your replies I went back to that program and changed it to...
  18. Replies
    7
    Views
    1,198

    A doubt about how data is stored in a file

    Hi all,

    I have a file in which each line is a tab seperated array of floats. And i have close 200,000 lines in that file. Now, I wanted a fast way to read this file.. Reading it line by...
  19. Replies
    4
    Views
    5,840

    Program crashing at fgets() - any ideas why?

    Hi all,

    As a part of my program, I am opening a file and reading it line by line in a loop and processing the lines.

    But my program keep crashing when I try to run it..


    ...
  20. Replies
    12
    Views
    2,671

    You were right.. I had written *array[i] instead...

    You were right.. I had written *array[i] instead of (*array)[i] while filling the array. That was what was causing the program to crash. Apologies..

    I understand what you were trying to tell...
  21. Replies
    12
    Views
    2,671

    Thank u, both of u for ur replies.. ...

    Thank u, both of u for ur replies..

    @Laserlight : I tried to compile the exact code that u posted (filling in the array filling step ofcourse) and run it. But it still crashes.. I guess even...
  22. Replies
    12
    Views
    2,671

    Hi laserlight, Thanks for the...

    Hi laserlight,

    Thanks for the reply. I understood what you said about using a seperate variable to keep track of the size of memory being allocated. But how should I use that...
  23. Replies
    12
    Views
    2,671

    Passing by reference to functions

    Hi all,

    I have a question about passing pointers to functions. Here's what I am doing.. I am defining a pointer to an array in my main and passing this pointer to a function.

    Inside this...
  24. Hey, Thanks a lot for the quick replies...

    Hey,

    Thanks a lot for the quick replies guys. It makes sense now.. Both the methods work. 'using only fgets and sscanf on what I need to parse' and also 'Just adding a space at the end of...
  25. Btw.. just in case its relevant, I am doing this...

    Btw.. just in case its relevant, I am doing this on the Microsoft Visual C++ 2005 cl compiler. And for now, I got around it by reading the prev line with fgets and doing sscanf on it. But i would...
Results 1 to 25 of 26
Page 1 of 2 1 2