Search:

Type: Posts; User: Conspiracy

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    2,367

    maybe, if((float)variable) { cout

    maybe,



    if((float)variable)
    {
    cout << "you entered an invalid number, try again: ";
    cin >> variable;
    }
  2. Replies
    2
    Views
    1,877

    Maybe this?>> #include #include...

    Maybe this?>>



    #include <iomanip>
    #include <string>
    #include <iostream>
    using namespace std;

    int main ()
  3. Replies
    12
    Views
    1,406

    WTF? Okay so I changed my code to this: ...

    WTF?
    Okay so I changed my code to this:


    #include <iostream>
    #include <fstream>
    using namespace std;

    class Date
    {
  4. Replies
    12
    Views
    1,406

    I followed matsp and kcpilot's advice and changed...

    I followed matsp and kcpilot's advice and changed my code to this:

    #include <iostream>
    #include <fstream>
    using namespace std;

    class Date
    {
    private:
    int month;
  5. Replies
    12
    Views
    1,406

    Well it looks good to me too, but it just wont...

    Well it looks good to me too, but it just wont save what I want!! and about my error checking, am aware of what you mentioned but thats what my professor asked for, so am not going to torture myself...
  6. Replies
    12
    Views
    1,406

    Data File problem

    Hello everybody.
    I am having problems with this program:



    #include <iostream>
    #include <fstream>
    using namespace std;

    class Date
  7. Replies
    9
    Views
    11,843

    The error is not related to the pow function...

    The error is not related to the pow function problem, its because you wrote <endl; and its <<endl;
    And you get it for times because you have this part:

    switch (response)
    {
    right++; //...
  8. Replies
    6
    Views
    1,232

    #include using namespace std; ...

    #include <iostream>
    using namespace std;


    int main()
    {
    int input;

    cout<<"1. Play game\n";
    cout<<"2. Load game\n";
  9. Replies
    9
    Views
    11,843

    int leftoperand, rightoperand, response, answer,...

    int leftoperand, rightoperand, response, answer, studentanswer, grade

    missing ;


    int leftoperand, rightoperand, response, answer, studentanswer, grade;



    char category, opt
  10. Replies
    10
    Views
    1,307

    No, that part is fine, the only warning the...

    No, that part is fine, the only warning the compiler gives is:

    Warning 1 warning C4244: 'return' : conversion from 'int' to 'float', possible loss of...
  11. Replies
    10
    Views
    1,307

    Thanks for the advise Daved, Thanks to you the...

    Thanks for the advise Daved,
    Thanks to you the program runs but theres a problem.
    Heres the changed program:



    #include <string>
    #include <iostream>
    using namespace std;
  12. Replies
    10
    Views
    1,307

    nope, it didint worked. I also tried this: ...

    nope, it didint worked. I also tried this:


    while(x < 1)
    {
    if(itemStockNumber == itemStockNumber.size(4))
    ++x;
    else
    cout << "The item's stock number must be a four digit number:...
  13. Replies
    10
    Views
    1,307

    oh sorry if (itemStockNumber ==...

    oh sorry

    if (itemStockNumber == itemStockNumber.length(4))

    Thats my problem, you have to put 4 digits, if you dont put 4 digits the program has to keep asking for it until you enter 4 numbers,...
  14. Replies
    10
    Views
    1,307

    String problems

    Hi everybody, am having problems with this program. Can anyone help me?



    #include <string>
    #include <iostream>
    using namespace std;

    class GroceryItem
    {
  15. Replies
    13
    Views
    1,525

    Thanks for your help, and no, I dont know how to...

    Thanks for your help, and no, I dont know how to repeat the same section of code multiple times.
  16. Replies
    13
    Views
    1,525

    heres what I have, this takes 3 numbers and...

    heres what I have, this takes 3 numbers and determines the greater number,



    #include <iostream>
    using namespace std;

    int main ()
    {
    int n1, n2, n3;
  17. Replies
    13
    Views
    1,525

    sorry but am lost... I dont understand and am so...

    sorry but am lost... I dont understand and am so frustrated. But thanks anyway.
  18. Replies
    13
    Views
    1,525

    Please Help Me

    Hello everybody am new here. Am starting with C++ and I have a homework I just cant figure it out. This may sound stupid but I need to do a program that takes 10 numbers and determines the greater...
Results 1 to 18 of 18