Search:

Type: Posts; User: but

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    728

    haha...thanks.

    haha...thanks.
  2. Replies
    13
    Views
    728

    lol- i finally solved it in 1 minute - with vi...

    lol- i finally solved it in 1 minute - with vi command!!

    Anyway it was all good learning - C looping, branching etc is easy -data reading and writing from files with the right data types etc is...
  3. Replies
    13
    Views
    728

    Here is what i did - #include ...

    Here is what i did -




    #include <math.h>
    #include <stdlib.h>
    #include <signal.h>
    #include <stdio.h>
    #include <string.h>
  4. Replies
    13
    Views
    728

    you could be right - when i did what you said -...

    you could be right - when i did what you said - the program hung. i mean i compiled it, but when i ran it - no result- no activity.

    Ok i tried what you said but the program has stuck completely -...
  5. Replies
    13
    Views
    728

    ok i did the code exactly as you said but keep...

    ok i did the code exactly as you said but keep getting the following message "warning: assignment makes integer from pointer without a cast"
    this is for the line where i say



    *p="0.0000";
  6. Replies
    13
    Views
    728

    lol ok - i was going to say that anyway - this is...

    lol ok - i was going to say that anyway - this is the second time you made a big program small using fgets and fputs - i shall also look up the other commands. thanks
  7. Replies
    13
    Views
    728

    sorry i didnt realize that pictures wouldnt help...

    sorry i didnt realize that pictures wouldnt help - it does an excellent job of showing where the gap lies though.

    If i copy the data here, then the spaces get removed - the space between the 2nd...
  8. Replies
    13
    Views
    728

    file reading problem #2

    Ok file reading is NOT my forte - I am much better at logical manipulation - once I manage to read the damned files, I seem to have few issues getting the output.

    I will appreciate greatly if you...
  9. Replies
    7
    Views
    571

    sure - here it is int i, j; double x, y,...

    sure - here it is


    int i, j;
    double x, y, z;
    char line[4096];
    FILE *fp;
    fp = fopen ("abcd.gro", "r"); // reading
    for (j=1; j<3; j++)
    {
  10. Replies
    7
    Views
    571

    hi thanks for the replies - let me see how much i...

    hi thanks for the replies - let me see how much i figured out of this -



    sprintf(filename, "%d.dat", i); // this is the main line where the files are named as per the counter i
    fpout =...
  11. Replies
    7
    Views
    571

    file naming problem

    I am not trolling and nor is this trying to complement the other thread I made.

    it is a genuine and real issue I am facing and worth starting a new thread - since it is very instructional.

    I...
  12. Replies
    38
    Views
    1,370

    i think i could be the hydra myself - it was a...

    i think i could be the hydra myself - it was a typo from me!!!

    so pls ignore the last few posts

    NOBODY"S FAULT BUT MINE
  13. Replies
    38
    Views
    1,370

    i checked - yes its "rounding up" - so every 8.6...

    i checked - yes its "rounding up" - so every 8.6 is becoming a 9 and so on.

    I havent checked to see if those z values where the fraction is less than .5 is getting rounded up or down.

    So i am...
  14. Replies
    38
    Views
    1,370

    is there a way to tell from the wrong answer its...

    is there a way to tell from the wrong answer its spitting out as to what the real problem could be - one time it was the position of the x (ie, 4, 8, 12 etc) instead of the value in the 4th, 8th...
  15. Replies
    38
    Views
    1,370

    my magic number IS that same number. the number...

    my magic number IS that same number. the number is always the same for each set. it need not be read and certainly cannot be written in the final output file.
  16. Replies
    38
    Views
    1,370

    omg - i was sooooo correct when i said it was...

    omg - i was sooooo correct when i said it was hydra headed !!

    the monster is still not slain, even after all your inputs - now the last (z) column is getting screwed up =

    Pls see the screen...
  17. Replies
    38
    Views
    1,370

    thanks a lot - pls explain the point of this line...

    thanks a lot - pls explain the point of this line -

    printf("bad line: j=%d i=%d\n[%s]\n", j, i, line); return EXIT_FAILURE;
  18. Replies
    38
    Views
    1,370

    can you pls show me a screen shot of the output...

    can you pls show me a screen shot of the output you got - this is what i got 14740 see what happens to the forst column from after the blue dot - thats when the 2nd set of data starts.
  19. Replies
    38
    Views
    1,370

    https://www.wetransfer.com/downloads/14641f356903e...

    https://www.wetransfer.com/downloads/14641f356903e46b6e23e1302348ffb920160406020049/04bafd1f7e85fd889281a690a502f39920160406020049/53c652

    thats the file
  20. Replies
    38
    Views
    1,370

    the code and the file

    the problem does occur soon as the first set is complete and we move into the 2nd - from there on instead of printing the x value, it writes the x number (instead of writing the 4th x, 8th x etc in...
  21. Replies
    38
    Views
    1,370

    ok sure - i have to be afk for a few hours but...

    ok sure - i have to be afk for a few hours but later today i shall upload the whole code and the first 2 or 3 sets of the data file - no need for 1000 sets. cheers.
  22. Replies
    38
    Views
    1,370

    I see thanks for the explanation - but this...

    I see thanks for the explanation - but this problem is hydra headed. So now it has reared its head again -

    here is the code i am running - based on your code -




    for (j=0; j<1000; j++)
    ...
  23. Replies
    38
    Views
    1,370

    Thanks a million. now the code works - I do have...

    Thanks a million. now the code works - I do have one doubt tho - i do not understand why you counted form 1 and why (because of the 1 i am guessing) you used a <= in the following -

    for (j = 1;...
  24. Replies
    38
    Views
    1,370

    I am lost !!!

    ok guys - sorry for bothering you again and again with the same issue, but i seem lost - every time i take one step forward, its two steps behind.

    the problem is this - as simply as i can put it....
  25. Replies
    38
    Views
    1,370

    Pls explain this line - the lines i want to read...

    Pls explain this line - the lines i want to read (not the 3 i want to discard) have a certain pattern - pls see my earlier posts in this thread - and are NOT characters.

    Thanks
Results 1 to 25 of 39
Page 1 of 2 1 2