Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   Data Table (http://www.go4expert.com/forums/data-table-t6948/)

Max_Payne_007 21Oct2007 03:57

Data Table
 
I made this Data Table.

The problem is when the outputs are different it will change the shape of the Table.

I need some tips on how can i fix this problem.

Thanks in Advance.

Code:

for ( int j = 0 ; j < 5 ; j++ )
                sum += myClass[j].getTotalToPay();

        cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl;
        cout << " x First |    ID    |  Pay-Rate  |  Worked-Hours  |  Over-Time  |  TotalPay  x" << endl;
        cout << " x Name  |  Number  |            |  ( Hours )    |  (Hours)  |  ( $ )    x" << endl;
        cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl;
       

        for ( int i = 0 ; i < 5 ; i++ )
        {
                cout << "  " << myClass[i].getName()
                        << setw(9)  << myClass[i].getNumber() 
                        << setw(11) << myClass[i].getRate()   
                        << setw(14) << myClass[i].getWorked() 
                        << setw(17) << myClass[i].getOverTime()
                        << setw(14) << "$" << myClass[i].getTotalToPay() << endl;
        }
        cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl;
        cout << "                                                        Totals x  $" << sum << endl;
        cout << "                                                                xxxxxxxxxxxxxx" << "\n\n\n";


DaWei 21Oct2007 06:45

Re: Data Table
 
This sort of stuff occurs two or three times a day. Let me make a suggestion: when you come to a forum, read the rules, the faqs, the "how to post" threads, or the "before you make a query" threads.

Would you join a new church and fart during the sermon without first discovering that was the norm, and what people liked?

These are HTML pages. They eat whitespace. That makes code look like doo-doo. The way to avoid that is to use code tags. What are those? Duh! They are explained in every forum I've ever attended.

No one wants to read ugly, unindented code. If they don't want to read it, how can they help you? I'm going to put your code tags in this time, but I am not your mama. Grow up. Be polite. If you can be rude, I can be ruder. Take it to the bank.

After I put in the code tags, someome might want to help. I might, even, after I get over your unthoughtfulness.

Max_Payne_007 21Oct2007 06:50

Re: Data Table
 
If you had an *Edit* button in this forum there will be no problem at all.

Max_Payne_007 21Oct2007 07:25

Re: Data Table
 
I have used the wrong tags [code=cpp] don't work here, when i wanted to edit it, i didn't find any Edit button.

I just don't understand why are you so Angry ? I wasn't rude to you or to anyone, If you don't want to answer that's fine believe me i couldn't care less, there are thousands of c++ forums out there.

You are throwing people away instead of attracting more users. & all because you couldn't care to put an EDIT button.

So **** You. & **** Your Forums, I won't stay another minute in this Forum to get insulted for no reason by someone who probably is an angry 40 year old virgin.

shabbir 21Oct2007 09:59

Re: Data Table
 
Quote:

Originally Posted by Max_Payne_007
If you had an *Edit* button in this forum there will be no problem at all.

You will have the edit button when you reach 25 posts for spamming related issues.

Quote:

Originally Posted by Max_Payne_007
I have used the wrong tags code=cpp don't work here, when i wanted to edit it, i didn't find any Edit button.

It does work and you seem to have done something wrong.
Code: Cpp

#include <iostream>
using namespace std;
int main()
{
    cout<<"Working"<<endl;
    return 0;
}

Quote:

Originally Posted by Max_Payne_007
So **** You. & **** Your Forums, I won't stay another minute in this Forum to get insulted for no reason by someone who probably is an angry 40 year old virgin.

It looks like you are more angry and believe me no one is angry with you.

Max_Payne_007 21Oct2007 10:07

Re: Data Table
 
Quote:

Originally Posted by DaWei
I am not your mama. Grow up. Be polite. If you can be rude, I can be ruder. Take it to the bank.

After I put in the code tags, someome might want to help. I might, even, after I get over your unthoughtfulness.

DaWei. Is a retarded old man. If you think what he said is right then you are as retarded as him.



Quote:

Originally Posted by shabbir
You will have the edit button when you reach 25 posts for spamming related issues.
[/code]

25 posts for an edit button. You are Ridiculous shabbir.

Quote:

Originally Posted by shabbir
It does work and you seem to have done something wrong.

It does work, If i had the Edit button, Don't you think i would have fixed it.

Your Forums are Retarded and So are You ...

shabbir 21Oct2007 10:15

Re: Data Table
 
Quote:

Originally Posted by Max_Payne_007
25 posts for an edit button. You are Ridiculous shabbir.

What do you think would be a better number. As because people tend to edit the posts and link to there site which we do not want.


All times are GMT +5.5. The time now is 11:27.