Search:

Type: Posts; User: Mingzhi

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,143

    Determining a user-defined class type

    If I have a class named Employee, what should I do in order to determine that an object is really of type Employee? Thank you in advance. Any criticisms about my problem being described as too vague...
  2. writing data to a file from an array of pointers

    Firstly, I apologized to all who are going to read my program. There are not comments and it is a long one. Anyway, I have a problem trying to write the data pointed to by Employee * STAFF[20] to a...
  3. Replies
    1
    Views
    1,521

    Flushing extra characters

    What should I do if I only want to display the sentence'Please enter only one char' once? should the user enter more than one character?
    My program will repeat the above sentence countless times if...
  4. Thread: How can I?

    by Mingzhi
    Replies
    2
    Views
    1,539

    How can I?

    Why I cannot use this methode to flush out the invalid input.
    I wanted to have the input part inside the while loop, unlike the one the FAQ show on the board(Inside the while condition).



    ...
  5. Thread: binary file

    by Mingzhi
    Replies
    1
    Views
    805

    thank u salem

    thank u salem you have been a great help:)
  6. Thread: binary file

    by Mingzhi
    Replies
    1
    Views
    805

    binary file

    can someone pls tell me what is wrong with my program




    #include <iostream>
    #include <fstream>
    using namespace std;
    int main()
    {
  7. Thread: .dat file

    by Mingzhi
    Replies
    2
    Views
    1,227

    .dat file

    can anyone please tell me how to create a normal file with the .dat extension because i want to save it as a binary file? thanks.
  8. Replies
    2
    Views
    1,217

    reply

    lol. i am quite ........one lar anyway thanks.
  9. Replies
    2
    Views
    1,217

    flushing invalid output

    // for example

    int choice=0;
    cout<<"Enter your choice please\n";
    cin>>choice;

    Question: If the user enters an integer, it is alright. However, if he enters lets say an alphabet, what should I...
  10. Replies
    3
    Views
    1,085

    Thanks

    A big thanks to all of u :)
  11. Replies
    3
    Views
    1,085

    how can i determine the size?

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

    struct inventory_items
    {
    int code,quantity,reorder_level;
    char name[20], item[3];
    double price;
    };
  12. Replies
    4
    Views
    874

    Thank you so much for replying back to my...

    Thank you so much for replying back to my queries. However, I am still a newbie lor & do not know how to convert data in a char to a floating point number. Need to learn more. Anyway, thanks for...
  13. Replies
    4
    Views
    874

    Problems with loops

    can anyone tell me what is wrong with my code?

    #include <iostream>
    #include <iomanip>
    #include <cstring>
    using namespace std;
    void input();
    void compute();
    void print();
    char name[6][21];
Results 1 to 13 of 14