| | |
Data Table
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
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.
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.
cpp Syntax (Toggle Plain Text)
[INDENT]double sum = 0; for ( int j = 0 ; j < 5 ; j++ ) sum += myClass[j].getTotalToPay(); cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" <<endl; cout << " x First | ID | Pay-Rate | Worked-Hours | Over-Time | TotalPay x" << endl; cout << " x Name | Number | | ( Hours ) | (Hours) | ( $ ) x" << endl; cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" <<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(13) << "$" << myClass[i].getTotalToPay() << endl; } cout << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" << endl; cout << " Totals x $" << sum << endl; cout << " xxxxxxxxxxxxxx" << "\n\n\n"; [/INDENT]
Last edited by Max_Payne; Oct 20th, 2007 at 8:04 pm.
This could be an array bound overflow problem.
![]() |
Similar Threads
- how to delete data from table (MS SQL)
- copy data from one table to other table (VB.NET)
- How to Update a Data Table? (ASP.NET)
- insert data from one form into two diffent database table (JSP)
- converting data in a table into csv (comma separated) file (VB.NET)
- SQL Query to populate the data from Table to Forms (MS Access and FileMaker Pro)
- Populate Listboxes with table data (VB.NET)
- How do you access Data in a QBasic 2.0 Data Table (Legacy and Other Languages)
Other Threads in the C++ Forum
- Previous Thread: reading file I/O
- Next Thread: reading data from file to vector
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linker list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template test text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






