Thanks for your help Joe. Appreciate it.
Type: Posts; User: dantestwin
Thanks for your help Joe. Appreciate it.
Don't have a cow. My intention was not to spam. I've posted several times on here in the past. Tonight I made a mistake and created a couple of threads when I shouldn't have but it will not happen...
I'm defining them using these 2 files:
sale.cpp
//definitions for Sales.h
#include <iostream>
#include "sale.h"
#include <iomanip>
Yes. I apologize for that. I'm desperate for help.
Ok, I added the statements you gave me to my sale.h file and now I get 2 Linker errors and 1 warning. What you said helped immensely and I'm sorry to be a pain. I'm a novice at programming and am...
well now I only get 2 and i have no idea why. I'm stuck.
I am now dissecting each file piece by piece. The project consists of 2 header files and 2 definition files plus a main program utilizing both classes. One of the definition files (sales.cpp)...
I wasn't trying to ignore you, please read the response i posted on the other thread.
...I wasn't determined to ignore you. I just started dissecting the files piece by piece. I thought I had it perfect and was getting bogus errors and then I discovered that there were some slips ups...
I am now dissecting each file piece by piece. The project consists of 2 header files and 2 definition files plus a main program utilizing both classes. One of the definition files (sales.cpp)...
Well i get all these errors:
main.cpp(26) : error C2065: 'ItemType' : undeclared identifier
main.cpp(26) : error C2146: syntax error : missing ';' before identifier 'saletype'...
yes i have. I'm a bit slow because i'm a newbie at c++. But i did what you suggested and i get over a hundred errors....multi file projects are a challenge for me.
that could work but for this task, i'm supposed to leave the names as they are. sale.cpp, register.h, register.cpp
So i have to include that in all my files?
Ugg, I do not know why I keep getting errors when I run this project. It ran perfectly before. If anyone can take a look and tell me why I get these errors, I would really appreciate it. Thanks.
...
thanks sean, i fixed the bug now. It compiles fine and everything but there is one logical error. The biggest element in the array is 10 and it the program prints out the current frequency for every...
Ok im almost done just keep getting this one error. grrrrr.
#include <iostream>
using namespace std;
int mode(int freq[],int a[],int size );//prototype
int main()
{
Couldn't another way also involve using a switch statement?
I just mean I want the function to count how many times each element is present in the array. The element that has the highest count would be the mode which is what I want the function to return.
I have an idea of how I want to tackle this but its hard for me to implement in code. I want the function to check each element and if it spots another one just like it, to do an incrementation. I...
I got it to work. Thanks Nick.
Ok, what you said made a lot of sense and I altered the code but now I get this inifinite loop!
void reverse(int a[], int size) //reverse order of elements in array
{
...
I've been trying to figure out how to reverse the elements in my array. But im drawing a blank. Any help would be greatly appreciated.
#include <iostream>
using namespace std;
void...
Hmmmm ok.....6 hours of working on code is really taking a toll on me....LOL. Thanks sean.
I usually do but I'm using visual c++ which has a funky autoformat thing happening.