The code is supposed to display the total and averages of the data as well, but cuts off due to an error in the code. The code should also:
1)Print checks for all employees, one per page, sorted by lastname. The first check number, 100, is to be read from a company data file (see requirement 4). The border of each check is important and should not be omitted.
2)Convert the net pay to a text string for each check printed.
3)Print a reference code on each check. The reference code is obtained by combining the first letter of the lastname with all the consonants remaining after removing all vowels (a,e,i,o,u).
4)Use the same employee data found in assignment 2. Use the following company data, obtained from a text file,
Output I'm expecting: Program to display totals and averages (worked before I turned everything into an array), now exits with error before totals/averages are displayed. Program also writes up a report.txt file that also writes this information into it, as well as using a quicksort to organize the names alphabetically, and print paychecks (all of the #BORDER, #HEADER1-8, #STUB, etc). In that check a reference code is also generated (teacher gave us code, we just had to modify for our final program as seen here)
Flow of the program: Print headings to label all of the input data we will enter soon under the categories as listed in the heading. Initialize all of our totals (in our array) to value of 0. These will be added in a loop "AddAccumulators" which takes our value for the hours, payrate, and taxes from each employee array structure and adds it to the total array. Program will write this information into the report.txt file with the HEADER line for totals, and should be displaying it in that picture. (Same for averages). After all of the data is calculated, the Reference code, Totals, Averages, and individual employee data is taken and put into printing out a Check Header and Stub.
I need coding this project using while loops and cout/cin.. It is suppose to be one while loop for the whole thing and inside of the first while loop is the second while loop for each sale separately.
You have been asked to write a program to calculate sales totals for a general store. Your program will not know how many products each customer will buy, so your program will have to repeat the process until the last product has been entered (use -1 for Product ID to end each sale). After each sale your program must ask if you want to do another sale (Y - continue, N - end program).
At the beginning of the day, the cash drawer has $500 in it. At the end of the program you must display how much money is in the drawer after handling all your sales transactions.
Input Your program must take the following input: - Product ID Number (int) - Quantity for each item purchased (int) - Cash Received at the end of the sale
Use the following dataset to determine the price and taxability for each item.
First Sale: Product ID Price Quantity Taxable 101 $65.00 2 Yes 102 $12.50 1 No 103 $24.50 5 No 104 $38.75 4 Yes 105 $17.80 6 Yes 106 $16.50 2 No 107 $42.85 8 Yes 108 $32.99 2 Yes 109 $28.75 1 Yes 110 $51.55 1 No
Second Sale: Product ID Price Quantity Taxable 102 $12.50 1 No 103 $24.50 1 No 106 $16.50 1 No 107 $42.85 1 Yes 108 $32.99 1 Yes 109 $28.75 1 Yes
Third Sale: Product ID Price Quantity Taxable 106 $16.50 4 No 107 $42.85 3 Yes 108 $32.99 1 Yes 109 $28.75 5 Yes 110 $51.55 2 No
Calculating Tax For those items that are taxable, assume a 7.5% sales tax. Be sure to keep a running total of tax for the each sale.
Getting Started You must use the starter file provided with this assignment. What to turn in: - A copy of your source code - A printout of your program's output
Trying to show the Row totals and the Column totals.
#include <stdio.h> int main() { /* start of main */ #define NUMROWS 5 /* establishes NUMROWS as 5 */ #define NUMCOLS 5 /* establishes NUMCOLS as 5 */ int val[NUMROWS][NUMCOLS] = { {23,06,85,22,01}, /* declares array val to have 5 rows and 5 columns */ {07,33,62,17,04},
[Code] ....
I receive this message after building:
1>------ Build started: Project: WA 4 A 1 Christopher Caron, Configuration: Debug Win32 ------ 1> WA 4 A 1 Christopher Caron.cpp 1>c:userschrisdocumentsvisual studio 2010projectswa 4 christopher caronwa 4 christopher caronwa 4 a 1 christopher caron.cpp(21): error C2106: '=' : left operand must be l-value
I am writing a employee payroll program using structures. My program is running but its only showing some of the data.
HERES MY CODE
Code: #include <iostream> #include <cstdio> #include <fstream> #include <string> #include <iomanip> #include <cstring> using namespace std; const int SZ = 20; // size of arrays to hold scores struct payrollStruct {
[Code] ....
And it doesn't show anything from txt file
Code: 40.0 10.00 A1234 Jane Adams 50.0 10.00 L8765 Mary Lincoln 25.5 10.85 W7654 Martha Washington 52.0 15.75 A9876 John Adams 45.0 25.00 W1235 George Washington
'm new to programing and I'm trying to get this program to add up a price of coffee to the add on extras such as cinnamon, etc. But once the program runs it doesn't add up the coffee price with the extras and I've been at it for hours...
Code:
#include <iostream> #include <cstdlib> using namespace std; int main()
i created an com client that try to create com server with the command CreateInstance. at win 7 it works fine (both 32 and 64 bit). but with xp it fails. i created the app with win 7 - 64 bit.
I was required to write a program that takes a baseball players statistics and displays there averages. I was required to make 3 function in the file to perform this tasks. my problem I am having a division problem in the SLG function. My compiler does not require the system ("PAUSE"); command.
OUTPUT The player's batting average is: 0.347 The player's on-base percentage is: 0.375 The player's slugging percentage is: (test)AB = 101 (test)Tot Base = 58 0.000
Code: /* Batting Average Program file: batavg1CPP.cpp Glossary of abbreviations: BA = batting average PA = plate appearances H = hits BB = bases on balls (walks)
I am getting some weird errors while building in release mode. It works fine in debug mode. Libraries and includes are linked in both debug and release version, but it's acting like it's not.
I have a few VC2008 projects whose solutions also includes deployment projects, in which the primary output of several DLLs are included along with the primary apps EXE file. These DLLs are all part of the solution. Now because of the way I do my DLLs, which for lack of better phrase I'll call a true DYNAMIC link (the .LIB file can be discarded), and because I'm careful to ensure full backward compatibility in any new DLL versions, I would like to tell my deployment project to ALWAYS replace existing DLLS with the new versions, or at least offer a choice if it shouldn't be done unconditionally. Unfortunately it never seems to do that!
I'm being careful to create new overall project versions within the deployment project itself, as well as keeping my version resources, attached to each DLL up to date, and always do a full rebuild of everything in the solution (including the DLLs) prior to building the deployment project. But time and again the old DLLs stay un-updated after the install, and the person running it would have no way to know that without examining the target directories and examining file dates and/or versions. A customer shouldn't have to go through all that. I've gotten into the habit of instructing installers to fully un-install old versions before installing a new one, but as you probably know uninstalling from the control panel won't remove shared DLLs.
I was starting to think maybe the latest DLLs weren't being included in the deployment project at all. But if I manually delete those DLLS and do the install, the latest greatest are then always placed.
If I can't find a setting in the deployment project to change this behavior, I'll have to write a separate little console app to force delete (or at least archive) all the relevant DLLs as a pre-installation step. Or maybe supply a BATCH file to do all that, and run the install last. But it seems like a reasonable thing that a setting to make a deployment (MSI) file unconditionally overwrite DLLS, whose version or creation date is newer, ought to be an obvious feature. But if such an option exists, I've missed it completely.
when ending my app in the debugger, memory leaks will be shown like this:
Detected memory leaks!
Dumping objects -> C:PROGRAM FILESVISUAL STUDIOMyProjectsleaktestleaktest.cpp(20) : {18} normal block at 0x00780E80, 64 bytes long. Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD Object dump complete.
How can I tell Visual c++ also to show me the memory leaks in a called dll?
I have been told to show some text document when our application starts up, it is an EULA. They gave me a word file and I saved this file in a .rtf format. I then wish to show this in a dialog box and found this on code guru: [URL]
Which seems to be a sub-class that will do all the formatting for me. So I use that class and then load in the .rtf file, using their setRTF method I just get an empty text box.
I just want to be able to show this formatted, somewhat pretty text from this document in my application as close as I can to the original document. Is there an easy way to do that? I could turn it into plain text, but I think that my boss would not be happy about that.
The problem was that I needed the text box to be marked multi-line.
I have problem reading CSV file, i found many solutions but i still got one problem. I need to read CSV file and then these values show in List Control and here i have problem. Idk how to display it in List?
The code below is supposed to fill, show, and revalue property. The fill function is supposed to return a pointer that creates a range of property values. The show function is supposed to show the property values entered and the revalued property values. I think part of the problem is the returned pointer from the fill function. Once that is cleared up, I think I will find more problems.
Code:
#include <iostream> const int Max = 5; // function prototypes double fill_array(double ar[], int limit); void show_array(double * begin, double * end);