Data Table

Discussion in 'C++' started by Max_Payne_007, Oct 20, 2007.

  1. Max_Payne_007

    Max_Payne_007 New Member

    Joined:
    Oct 20, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    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";
    
     
    Last edited by a moderator: Oct 21, 2007
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    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.
     
  3. Max_Payne_007

    Max_Payne_007 New Member

    Joined:
    Oct 20, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    If you had an *Edit* button in this forum there will be no problem at all.
     
  4. Max_Payne_007

    Max_Payne_007 New Member

    Joined:
    Oct 20, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    I have used the wrong tags
    Code:
     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.
     
  5. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    You will have the edit button when you reach 25 posts for spamming related issues.

    It does work and you seem to have done something wrong.
    Code:
    #include <iostream>
    using namespace std;
    int main()
    {
        cout<<"Working"<<endl;
        return 0;
    }
    
    It looks like you are more angry and believe me no one is angry with you.
     
  6. Max_Payne_007

    Max_Payne_007 New Member

    Joined:
    Oct 20, 2007
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    DaWei. Is a retarded old man. If you think what he said is right then you are as retarded as him.



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

    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 ...
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    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.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice