Search:

Type: Posts; User: c++prog

Search: Search took 0.01 seconds.

  1. Replies
    12
    Views
    1,972

    I don't know much about classes which is why I...

    I don't know much about classes which is why I didn't use them for this program but later after learning more I might try and implement it into the program. I just modified the quicksort from this...
  2. Replies
    12
    Views
    1,972

    How would I maintain the association between the...

    How would I maintain the association between the balance and the id while sorting id in ascending order using your code zalezog? I was able to do it with the old code after changing the parameters by...
  3. Replies
    12
    Views
    1,972

    Yeah, everything is sorting correctly. I'm just...

    Yeah, everything is sorting correctly. I'm just trying to figure everything out.
  4. Replies
    12
    Views
    1,972

    Why is the "&& i < j" needed even though the...

    Why is the "&& i < j" needed even though the while loop that it is within already checks for that? When I comment it out the sort works incorrectly with 4 values and with 5 it crashes but I don't...
  5. Replies
    12
    Views
    1,972

    Thanks for the help. I don't completely...

    Thanks for the help. I don't completely understand it yet but I will work on it.
  6. Replies
    12
    Views
    1,972

    Help with quicksort

    I need help implementing quick sort on this but everything else works right. I don't get any errors when compiling the program but when I run it and enter the values I get an error that says it has...
  7. Replies
    9
    Views
    1,239

    The reason I removed all my code was because this...

    The reason I removed all my code was because this was for an assignment and I didn't want anyone to cheat off of it. If you want to see what I have now I can private message it to you.
  8. Replies
    9
    Views
    1,239

    Nevermind, I've figured it out by looking up...

    Nevermind, I've figured it out by looking up information online and editing the function. Thanks to everyone.
  9. Replies
    9
    Views
    1,239

    I changed the function header to void...

    I changed the function header to void bubblesort(double *arraya, int length); and now it will compile but it won't sort the array.
  10. Replies
    9
    Views
    1,239

    No, is it because I'm using a pointer? Because...

    No, is it because I'm using a pointer? Because even using the bubblesort function that I have commented out I still get the same error and I am not using a pointer in that one.
  11. Replies
    9
    Views
    1,239

    Help implementing bubble sort

    This is something that I have been working on but when I compile it I get the can error that says for the line
    Could anyone tell me how to fix this?
  12. Replies
    3
    Views
    1,139

    How would I print out whats in the if else...

    How would I print out whats in the if else statements then? Sorry for so many questions, it just seems like all the small things are what give me the most trouble in C++. This isn't the first time...
  13. Replies
    3
    Views
    1,139

    Need help displaying output from function

    Ok, what I want this function to do is generate two arrays, called box, each with 3 numbers and it will tell the user which, if any, of these numbers are equal. However, the biggest problem I am...
  14. Replies
    1
    Views
    872

    Writing to a file

    I am doing a challenge that asks the user a name and telephone number and then stores it in a file. This is what I have so far:

    #include <iostream>
    #include <fstream>
    #include <cctype>
    using...
  15. Thread: I/O help

    by c++prog
    Replies
    9
    Views
    1,182

    Is this what you want me to do? for (count

    Is this what you want me to do?

    for (count < 10 && !getline(dataFile,buffer));
    getline(dataFile,buffer);
    cout << buffer[count] << endl;

    This gives my syntax errors. It says missing ';'...
  16. Thread: I/O help

    by c++prog
    Replies
    9
    Views
    1,182

    Now I'm having another problem. I just repeated ...

    Now I'm having another problem. I just repeated
    getline(dataFile,buffer);
    cout << buffer[count] << endl; but when I do that it will always print 10 lines and will repeat the last line of the...
  17. Thread: I/O help

    by c++prog
    Replies
    9
    Views
    1,182

    Ok, thanks. I was just trying to challenge myself.

    Ok, thanks. I was just trying to challenge myself.
  18. Thread: I/O help

    by c++prog
    Replies
    9
    Views
    1,182

    If I do that it just prints the third character...

    If I do that it just prints the third character on the line.
  19. Thread: I/O help

    by c++prog
    Replies
    9
    Views
    1,182

    I/O help

    I am working on an exercise that has me ask the user for the name of a text file and then display the just the first 10 lines of it. If there is 10 lines or less, I have to tell the user the entire...
  20. Replies
    2
    Views
    2,836

    Help with structures

    I am doing a problem that asks me to write a program that uses a structure named CorpData to store the following information on a company division and it asks me to store various sales numbers and...
  21. Replies
    4
    Views
    1,208

    It worked, thanks.

    It worked, thanks.
  22. Replies
    4
    Views
    1,208

    beginners question

    I'm doing some practice problems in my c++ book and this particular one has me stuck. The problem asks to calculate 80% of the amount it would cost to replace the structure but when I try to compile...
Results 1 to 22 of 23