Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dnnymak

    detecting end of file?

    thanks uolj, thats what I was looking for. I am using the following to read the file: for (int i = 0; i <= M -1; i++) { for (int j = 0; j <= N -1; j++) { InputFile1 >> imatrix[i][j]; } } and I wanted to test for a...
  2. dnnymak

    detecting end of file?

    thanks Kevin
  3. dnnymak

    detecting end of file?

    How do I detect end of file when reading from a file. I have tried cin.eof(), but I think this is only for reading from keyboard input. Also, does c++ automatically detect white space when reading files or is it ignored? Thank you all, dnnymak
  4. dnnymak

    double star before a variable? * *

    Great, thanks for the help!!
  5. dnnymak

    double star before a variable? * *

    I am trying to read a .pgm file into an array. The code I was given has the following variable declaration: int **image; what does the "**" mean before image? thanks, Dnnymak
  6. dnnymak

    Returning 3 values from a class??

    Thanks for the help guys!! dnnymak
  7. dnnymak

    Returning 3 values from a class??

    Maybe I dont know what a class is. I have been creating classes like functions, which has been a lot of work. I guess a class should be a collection of functions, like a car has wheels, brakes ... I think I am trying to make my car class out of a bunch of little classes. Does that make sense?
  8. dnnymak

    Returning 3 values from a class??

    Sorry about the confusion, I was using that as an example (I meant cross product). Anyhow, I am taking a computer graphics class and am doing some ray tracing. Therefore I am doing a lot of vector math and am trying to keep it portable by creating classes to do some of the work. I am fairly new...
  9. dnnymak

    Returning 3 values from a class??

    I am trying to create a class that does a Dot-product; it returns an x, y and z value for a vector. I have implemented it so that I have to call it 3 times to get each value. Very inefficient! Can I return an array from a class? I have been able to read an array into my class, but can't figure...

Part and Inventory Search

Back
Top