![]() |
| ||
| 2 Compile errors in my array program Need help in finishing this problem. I was doign ok at first but somehow ran into 2 compile errors. Now I'm tired and going in circles. I need a fresh pair of eyes to look it over. This is my first time doing arrays. #include <iostream> My output should look something like this... any help with finding my 2 compile errors would be appreciated. Here is my infile: JOE JONES 123-45-6789 NM BOB SMITH 111-11-1111 AL JOHN DOE 999-12-1234 AA JEB BUSH 111-11-1112 FL JIMMY CARTER 222-22-2222 GA JANE DOE 999-22-1111 ZZ ROBERT WHEATFIELD 888-88-0000 KA JUNE HAYSEED 222-22-3456 IA ARNOLD SWARTZ 678-88-1111 CA HENRY FORD 121-21-2121 MI VIDA BLUE 234-00-1111 CA JOHN WAYNE 666-66-0000 CA WILLIAM SWAMPRAT 555-55-0987 MS MATTHEW BLUNT 777-00-1111 MO DANIEL BOONE 111-99-0000 MO ZEB WASHINGTON 999-99-9999 X1 |
| ||
| Re: 2 Compile errors in my array program could it be that infile and outfile are not defined? It would help if you posted the compile errors. outfile.open("report.txt"); |
| ||
| Re: 2 Compile errors in my array program First off, I would suggest adding some tab characters "\t" instead of explicitly adding all the white spaces in. It makes your code really hard to read like it is. |
| ||
| Re: 2 Compile errors in my array program Here Is The Corrected Code #include <iostream> |
| ||
| Re: 2 Compile errors in my array program Quote:
|
| ||
| Re: 2 Compile errors in my array program Quote:
|
| ||
| Re: 2 Compile errors in my array program Quote:
After this program, I'm gonna go back to easier examples and start again from the beginning over Thanksgiving break. |
| ||
| Re: 2 Compile errors in my array program Spaces over tabs -- always. |
| ||
| Re: 2 Compile errors in my array program Ahh the good old printf("Name: %5s", value)... I am sure I saw a format function somewhere in the stream classes but i have missplaced it!!! |
| All times are GMT -4. The time now is 10:15 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC