jlou,
thanks for getting back online!! I found that problem myself, and was glad when I did find it. Do you have an instant messaging program you use that I could communicate with you on? It...
Type: Posts; User: jstevanus
jlou,
thanks for getting back online!! I found that problem myself, and was glad when I did find it. Do you have an instant messaging program you use that I could communicate with you on? It...
This is my header file cs116prog5.h that goes with my cs116prog5.cpp file:
const float TAX_RATE = 0.06;
const int NUM_ITEMS = 9;
struct SalesItem
{
char upc; // universal...
Ok, I'm posting my *.cpp program here, I also have a *.h file with my function prototypes and struct definition included.
// Josh Stevanus Prog 5
// last program
using namespace std;
...
the || portion of my IF statement has been fixed, I can post the new code if you would like. Thanks again for your patience. I am sorry if I'm unable to phrase my questions correctly, this is my...
jlou, after I make the function call accept_item_code(upc); i use cout to print a message so that I know the function call was completed. I do not get that message, so I know the function is wrong...
Frantic, I don't see where you changed my code at all...
You're right, I have posted many topics. I will continue using this thread. As far as my function call I'm just using:
accept_item_code(upc);
another note: do I need to declare upc as a...
I have a program due tonight and am having numerous problems. Here is one function that is not working right:
void accept_item_code (char& upc)
{
bool valid = false;
cout << endl...
I recoded my function, but it is still stopping my program after the user enters the input. The function should return the char value if the user enters a valid letter (A through I or X). But, it...
I have a very long IF Statement that doesn't seem to be working. What is the proper way to code this:
if (c == 'A' || c == 'B' || c == 'C' || c == 'D' || c == 'E' ||
c == 'F' c...
Thank you very much, that was exactly the type of answer I was looking for. I see what you mean, and I am changing my code immediately. I wish you were around all the time for my problems!
Thanks...
I posted a thread before, but I have recoded since. All my function prototypes are now in my header file, and their definitions are in my *.cpp file. The function I am having trouble with seems to...
I was told by my professor that my function prototypes should be included in my *.h file. But, do I also include the function definitions in that file, or do those go in my *.cpp file? Please...
Ok, that first code I posted is working now, but the programs seems to lock up right after that. Here is the code for the function I'm using:
char accept_item_code ()
{
char c;
cout...
This part of my code is included in a header file. This is the first time I've used a *.h file in my program. I have tried that code in a separate program and it works fine, but in this one it does...
here is the portion of my code that doesn't seem to be working... please help if you can at all:
cout << "Enter product code: ";
cin >> c;
c = toupper(c);
cout << c;
Josh...
thank you sir, i think that will help me a great deal!
I do not have the index number to the array. I only have the value of the char upc, and with that need to match up the value of "name" and print it. If I knew what index in the array the specific...
here is the code:
struct SalesItem
{
char upc;
string name;
}
SalesItem itemList[NUM_ITEMS];