Search:

Type: Posts; User: kas2002

Page 1 of 9 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    1,115

    Got it! Thanks

    Got it!

    Thanks
  2. Replies
    2
    Views
    1,115

    Weird while loop problem

    Hey all,

    So I have a file called h.list which is a text file containing all of the filenames of the working files the rest of my program will open sequentially and use. Now for some reason the...
  3. Replies
    5
    Views
    4,191

    I figured it out. I was setting the color and the...

    I figured it out. I was setting the color and the material and I think only the material properties were being applied...

    This works, however, the alpha compoent of mat does nothing. I would like...
  4. Replies
    5
    Views
    4,191

    Simple OpenGL question

    Hey guys,

    So I am using openGL to 3D plot some particle positions but I need to tag some particles blue and some red based on a flag read in from my data files.

    Here's what I attempted to do...
  5. Replies
    3
    Views
    949

    I have a good reason for that, however, in...

    I have a good reason for that, however, in thinking deeper about your comment it is true that I need to do this a different way.

    I just figured it out thanks to that.

    Thanks!
    Paddon
  6. Replies
    3
    Views
    949

    Sorting/Dynamic Array's

    Hey hey,

    So I've encountered a weird problem that I am not sure how to work around. I'm trying to calculate distances between particles in a system, store them in an array, sort it, and extract...
  7. Replies
    19
    Views
    3,662

    Cool MK27 thanks for the tip, I was having...

    Cool MK27 thanks for the tip, I was having difficultly locking down where exactly it was happening because of the fact that.

    Cool, I see it now. I was looking in the complete wrong place for the...
  8. Replies
    19
    Views
    3,662

    Segmentation Fault

    I cannot seem to figure out where I am getting a segmentation fault in my program. I've narrowed it down to where it is occurring but everything seems ok to me.



    void nearest_neighbor(int s){...
  9. Replies
    2
    Views
    2,248

    Reading Exponents, fscanf()

    So I have been bug searching in a code now for a couple of hours only to realize the data set I inherited (which was generated by a simulation written in Fortran77) represents exponents as follows:
    ...
  10. Replies
    4
    Views
    2,882

    I think I can accomplish the same thing by...

    I think I can accomplish the same thing by performing the calculations on one array at a time and then dumping the results of it to a histogram.

    Which means I would only be working with a single...
  11. Replies
    4
    Views
    2,882

    So... Judging by that fact. I may need to...

    So...

    Judging by that fact. I may need to rethink how I am performing these calculations.
  12. Replies
    4
    Views
    2,882

    Large 2D Array's Problem

    Hello all,

    So I have a program for which is is necessary for me to have many (7) large arrays (order of 8000x8000) of the type long double. Obviously, this has proven difficult for a novice...
  13. Thread: Data Types

    by kas2002
    Replies
    1
    Views
    1,159

    Data Types

    Hey all,

    So I am writing a scientific code and thus precision of the numbers I am dealing with is very important. I have a text file as follows containing coordinate data:



    ...
  14. Replies
    11
    Views
    1,478

    Really weird file I/O problem

    Hey all,

    I have been attempting to write the following simple program. I want to take a file that looks like this



    Header stuff not needed
    more useless header
    5.88 3.55 1.22
    6.77 8.99 2.33
  15. Replies
    23
    Views
    13,462

    ok, I do initalize j with the first variables but...

    ok, I do initalize j with the first variables but I did what you said and it did get ride of the bus error.

    but there has to be a problem after fptr2 because as you can see I print out arry[] and...
  16. Replies
    23
    Views
    13,462

    Actually I am using XCODE and g++ now. XCODE just...

    Actually I am using XCODE and g++ now. XCODE just as an editor though. The code is by no means long, I have posted it below.




    #include <stdio.h>
    #include <stdlib.h>
    #include<unistd.h>
    ...
  17. Replies
    23
    Views
    13,462

    fptr2=fopen(outfile,"w"); if (fptr2 != NULL){...

    fptr2=fopen(outfile,"w");
    if (fptr2 != NULL){
    for(int k=0;k<count;k++){

    fprintf(fptr2,"&#37;d\n",arrayPtr[k]);
    printf("%d ",arrayPtr[k]);
    }
    }
    else{perror("oops");}
  18. Replies
    23
    Views
    13,462

    I thought a lot of file errors would be...

    I thought a lot of file errors would be immediatly obvious anyway considering this code was just for me. Which is why I left out all the file error checking. I'll put it in and see what happens, but...
  19. Replies
    23
    Views
    13,462

    ok, I just maybe found where the bug is. That...

    ok, I just maybe found where the bug is. That function above takes the argument name.

    Now apparently (I realize this is something that I should have caught before :S) the file I am passing to the...
  20. Replies
    23
    Views
    13,462

    Touché, you caught me in my bad coding....... ...

    Touch&#233;, you caught me in my bad coding.......

    I have taken your advice though and I am still just getting a final output of all zeros. The arry is still not incrementing and I am not getting any...
  21. Replies
    23
    Views
    13,462

    The 1001 standard has nothing to do with this...

    The 1001 standard has nothing to do with this code, and more to do with our simulation codes which are written in FORTRAN77 and my professor's old standards.

    As for the efficency comments I will...
  22. Replies
    23
    Views
    13,462

    Ok, well here is the function it is occuring in....

    Ok, well here is the function it is occuring in. I think since the function is essentially self contained it should illustrate what I am trying to do nicely.

    As per an explaination. My data is...
  23. Replies
    23
    Views
    13,462

    Well I tried changing that and I was wrong........

    Well I tried changing that and I was wrong..... for some reason this is not working



    while (fscanf(fileptr,"&#37;f", &tmp2) != EOF) {
    printf("\n\nIncrementing Particle %d", tmp2);...
  24. Replies
    23
    Views
    13,462

    So, I used your example but it is not quite...

    So, I used your example but it is not quite working. The while loop never gets executed. Even though I know the file exists and has data in it.

    Should the EOF be in single quotes? Double Quotes?
  25. Replies
    23
    Views
    13,462

    hmmm I just realized then, that I posted in the...

    hmmm I just realized then, that I posted in the wrong forum. My entire code is written in C.

    Sorry, if an admin could move this though would be seller, otherwise I will just delete it and repost.
Results 1 to 25 of 208
Page 1 of 9 1 2 3 4