Search:

Type: Posts; User: underpressure

Search: Search took 0.00 seconds.

  1. Replies
    15
    Views
    431

    Yes I am programming in Windows 10 using Dev-C++

    Yes I am programming in Windows 10 using Dev-C++
  2. Replies
    15
    Views
    431

    Makes sense. I guess for it is hard to debug my...

    Makes sense. I guess for it is hard to debug my program when I can't think of potential errors. I am assuming there are no blank lines because looking at my text file there simply isn't any.

    I...
  3. Replies
    15
    Views
    431

    This is my train of thought while...

    This is my train of thought


    while (getline(inFile,text))

    Tells me that as long as the program can read a line of string it'll do the following



    {
  4. Replies
    15
    Views
    431

    This is simply it 15802

    This is simply it

    15802
  5. Replies
    15
    Views
    431

    Soooo I spoke too soon. For some reason I'm...

    Soooo I spoke too soon. For some reason I'm getting some weird output when I run my program. Mainly theres seems to be random duplicates appearing and I'm not too sure why.
    My current code:

    ...
  6. Replies
    15
    Views
    431

    Thanks laserlight. Using a while loop for getline...

    Thanks laserlight. Using a while loop for getline works much better and cleaner than the other approach I was using. It is a shame that I am being taught bad code in my C++ class when there is much...
  7. Replies
    15
    Views
    431

    Hi laserlight; unfortunately I am not allowed to...

    Hi laserlight; unfortunately I am not allowed to make the book struct into a class. I have to have it as a struct under the Collection class as per guidelines of my assignment.

    I'm not sure what...
  8. Replies
    15
    Views
    431

    Long question about Class and output

    Hello,

    I'm currently working on a program where I have a file I retrieve data from, and sort the different options (title, author, genre) and display the sorted list for each option. I have to...
  9. Never mind. I have figured it out

    Never mind. I have figured it out
  10. Is there no way to use maybe a for condition in...

    Is there no way to use maybe a for condition in the main when I am asking it to cout << uni[loc] << yearlytuit[loc] ?
  11. Finding minimum in Array (2 equal minimums)

    hello!

    I am writing a program to find the minimum value in an array that is within an int function. There are two elements in the array that have the same value and I need to be able to output...
  12. Excellet advice again. I totally get it now....

    Excellet advice again. I totally get it now. Thank you for the help!
  13. Thank you laserlight. Simple tip for me to figure...

    Thank you laserlight. Simple tip for me to figure out but such an obvious mistake I discovered in my code... it works now excellently. One last question; I initialized my flag variable to be equal to...
  14. Thanks for catching that. Should've been using...

    Thanks for catching that. Should've been using the equality operator. And I will rename flag in my final iteration of program as soon as I get it to work, just a name holder for now. Program still...
  15. That doesn't do anything as I still get the same...

    That doesn't do anything as I still get the same result
  16. #include #include #include...

    #include <iostream>
    #include <iomanip>
    #include <fstream>
    #include <string>


    using namespace std;


    //function prototype
  17. Thank you. Makes sense to make it more efficient...

    Thank you. Makes sense to make it more efficient rather than separate.

    Do you have any idea on how to make my min code work? I declared min = 100 since I know that there are values lower than 100...
  18. I got it for the max option.. I'm not sure how to...

    I got it for the max option.. I'm not sure how to do it for the min option?



    #include <iostream>
    #include <fstream>
    #include <string>


    using namespace std;
  19. Thank you for the input all. Unfortunately I...

    Thank you for the input all.

    Unfortunately I have not learned limits yet in my class so I am unable to utilize them.

    I think I can still take the advice given by Niccolo and cooper by...
  20. Finding mix & max of a calculated variable from an input file

    I'm currently learning about fstream in my beginner C++ class. I have an assignment where I am asked to do various things. I have a file that I read the name of the cities and their affiliated cost...
  21. Thanks for the response - I am trying make a...

    Thanks for the response -

    I am trying make a condition where if the totalcost variable is less or more than the minimum total for each different case ('X', 'S', 'L').

    So I assume I would have...
  22. Nevermind; I realized I didn't add my variables...

    Nevermind; I realized I didn't add my variables to the prototype in line 6 as well as the calculation in main in line 38.

    A follow up questions; it doesn't seem to be calculating my totalcost...
  23. New to C++; not sure how to solve error regarding my code w/ functions

    Hi all,

    I'm taking an introduction to C++ right now and I've been scratching my head over these errors. I'm not sure why my function is not being defined?

    The errors are: undefined reference to...
Results 1 to 23 of 25