15,895,606 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by EDITH GINGRAS (Top 18 by date)
EDITH GINGRAS
24-Nov-10 21:26pm
View
i am not getting an error it just does not give the correct answer example 5 hr at 5 per hour should be 25 dollars I get a random number 871etc and it does not matter what I do with that code it still does the same thi
EDITH GINGRAS
24-Nov-10 8:40am
View
what do you mean fix this I am not seeing what you mean the setup is the same as the others can you be more specific
EDITH GINGRAS
18-Nov-10 21:34pm
View
I tried ti chang this and got these errors and when I do it the other way and put the } in I get return error expecting statement so what is wrong here?
int calwadges() {
int total = twadges * numhours;
}
return total; //gives error s below
1>c:\users\edith\documents\visual studio 2010\projects\wk11\wk11\wk11.cpp(73): error C2059: syntax error : 'return'
1>c:\users\edith\documents\visual studio 2010\projects\wk11\wk11\wk11.cpp(73): error C2238: unexpected token(s) preceding ';'
but if worded
return calwadges(); without the } before return statement it will run but it gives wrong answer input 5hr'6 wadges should produce 30 but I get 681something if I put in the } I get error at return expecting a statement.
EDITH GINGRAS
18-Nov-10 20:47pm
View
how do I fix this to run properly? should I take it out at the bottom in the last section or remove the return but if i remove the return I get needs a return how do I get around this?
EDITH GINGRAS
1-Nov-10 19:53pm
View
Ok I changed the wording and now I am getting
1>c:\users\edith\documents\visual studio 2010\Projects\hwweek9\Debug\hwweek9.exe : fatal error
3 of these in a row how do I fix this? thanks
#include<iostream>
using namespace std;
//Function Header
int myarea(int width,int height,int length);
int mytriangle(double base);
int mycircle (int dist);
int mychoice (int square,int rectangle,int triangle, int circle);
//Main function
int main(){
int choice;
int square =1,rectangle=2,triangle=3,circle=4;
cout << "Enter 1 for square " << square << endl;
cout << "Enter 2 for rectangle " << rectangle << endl;
cout << "Enter 3 for triangle " << triangle << endl;
cout << "Enter 4 for circle " << circle << endl;
cin >> choice;
return choice;
int width,height,length,base,dist;
cout << "Enter the width: ";
cin >> width;
cout << "Enter the height : ";
cin >> height;
if (width == length){
cout << "The area of a square is "<<myarea(width,height,length) <<endl;
}else if (length == height){
cout << "The area of a rectangle is " << myarea(width,height,length) << endl;
}else if (( base * .5) * height){
cout << "The area of a triangle is " << mytriangle(base) << endl;
}else if (dist * 3.14){
cout << " The circumference of a circle is " << mycircle(dist) << endl;
system ("pause");
return 0;
}
//End of program
//Call the function
int myarea(int width,int height,int length);
int mytriangle(int base);
int mycircle (int dist);
int mychoice (int square,int rectangle,int triangle, int circle);
int number;
number = (width * height) || (length * height) || ((base *.5) * height) || (dist * 3.14);
return number;
}
//End of function
EDITH GINGRAS
31-Oct-10 11:25am
View
ok i see thanks but now there are even more errors on this. I changed the mychoie to sqaure == square etc for the rest
EDITH GINGRAS
31-Oct-10 10:56am
View
ok thanks I see what I did there i changed it to else if then the else last
EDITH GINGRAS
31-Oct-10 9:54am
View
no I do not can you explain this
EDITH GINGRAS
24-Oct-10 11:32am
View
ok i get what you are saying but i forgot to add that part of the program to the list i will post it now it is the first loop information then followed by the rest that is already posted sorry so now that you see that I have this part how will I get the results of student average and class average out of it? thanks
cout << "Enter the number of students: ";
cin >> numstudent;
cout << "Enter the number of grades: ";
cin >> numgrade;
EDITH GINGRAS
24-Oct-10 9:08am
View
ok I think I got what you mean but where in the array would this take place I am confused on how to get the information out of the array and use it for the avg calculation then to get the class average out of the arrays be more specific on that process please it would help me to understand how to work it thanks
EDITH GINGRAS
22-Oct-10 22:49pm
View
ok got things to work for that now how would I get the student average to display? I know the curgrades needs to be divided by the numgrades but this does not work when implemented curgrade reads under defined so how would I define it to work ?
EDITH GINGRAS
22-Oct-10 9:44am
View
thanks I was going to change that anyways but besides that I tried this avenue and when I try to run it I get the on consol numgrades numstudents curstudent curgrade but then I get a bunch of dk2-> pointing in a downward row. I found this not to work properly prior to your post so I thought I should try another way and yes it is a fixed size I donot know about that class yet thanks
EDITH GINGRAS
22-Oct-10 9:10am
View
ok now I am confused what do you mean by logic and where are you speaking about the names and the grades and the num grades and the num student part of this is working fine its the other part that is not working that is the problem sorry I am not good at explaining what I needed the help with the problem begins when I try to get the name, grade and average in a table like format using the array. Or is this already there and all I need is to add the total average grade for student array to the print out and then just get the total average of the class array to print out the results? ok I think Im on to something here but I could be wrong thanks any more help on this is appreciated
EDITH GINGRAS
17-Oct-10 18:24pm
View
I HAVE NOT GOTTEN TO UNDERSTAND ARRAYS YET AMS STILL ON THE WHILE DO FOR IF ELSE ELSE IF STAGE LOL
EDITH GINGRAS
17-Oct-10 18:22pm
View
oh I am sorry but I AM 50 YRS SO THANKS THAT IS WHY I ASKED FOR SPECIFIC ANSWERERS SO THAT I WOULD UNDERSTAND HOW IT ALL WORKS
EDITH GINGRAS
13-Oct-10 7:26am
View
yes thanks but I still do not understand why its placed where it is and how can I tell where it goes? I am feeling overwhelmed because I cant get this in my head your answer is good but I want to understand how this is figured out step by step if you dont mind with explanations along the way
EDITH GINGRAS
13-Oct-10 7:21am
View
You are a bit ahead of me here I am not understanding the while for and if do statements I am not ready for the array yet thanks for the idea thought need to get this down first thanks
EDITH GINGRAS
12-Oct-10 22:52pm
View
thanks but I am still not understanding where all this code goes into the program I am not getting this at all for some reason and even though I have read this stuff its not clicking in my head can you explain this a little clearer for me I would really appreciate it.
Show More