Grn Xtrm 84 Posting Pro in Training

The cmath library has built in functions to calculate the sin, cos, and tan. Look here for more info:
http://www.cplusplus.com/reference/clibrary/cmath/

Nick Evan commented: That'll do just fine! +10
Grn Xtrm 84 Posting Pro in Training

You gotta be some kind of loser to go and downvote over 6500 posts from one of the best and well respected members in the community. Seeing Ancient Dragon's post quality at 34% is a joke. It's time for the up/down vote system to make its exit. It's always good to try something new, but you have to know to scrap it when its not working as intended. William's observation proves that this system is dead and cannot work as long as immature people are members of the community.

jephthah commented: yup +0
Salem commented: Well said +0
Grn Xtrm 84 Posting Pro in Training

Reading the dumbest thread I've ever seen :)
Just kidding I've seen dumber. ;)

Grn Xtrm 84 Posting Pro in Training

I would bring my Hofner bass, my laptop (also with infinite battery, because that's possible ;) ) , my iPod (I guess that needs infinte battery life as well) and my cell phone with... you guessed it infinite battery life ;)

Grn Xtrm 84 Posting Pro in Training

The parameter in the function is different from the parameter in the function call. To be more specific, the call has an array as the parameter, while the definition has an int value that is not an array. They must be the same data type.
But if I may offer my personal take on the matter:
I would make the function a void function with no parameters. Your current function is also wrong because it is declared as int but does not return an int value. Void solves this problem because a void function does not return any values.
Here is what I had in mind.

#include <iostream>
using namespace std;
 //Function prototype
void  fillArray();
int main()
{
    fillArray();
    return 0;

 }  //End main fn
 
 //****************************************************
 //Function definition
void fillArray()
{
     const int SIZE = 3;
     int num[SIZE];
     for (int i=0; i < SIZE; i++)
         cin   >> num[i];
     for (int i=0; i < SIZE; i++)
         cout   << num[i]; 
 }  //End fillArray fn.

The function creates the array, fills it, and outputs its contents. Let me know if you need any clarification.

Grn Xtrm 84 Posting Pro in Training

Actually, I was the first abuser of the voting system. I down voted every single post by The Mad Hatter. So...way to be wrong ;)

Yeah, you and everyone else who read that thread ;)

nav33n commented: :D +0
Grn Xtrm 84 Posting Pro in Training

Don't quit. Just limit your posts to pieces of advice that you think will be beneficial to the OP. Don't post for the reputation and solved thread count, post because you want to help people with their problems. I havent read any of your alleged bad posts, so I dont want to judge, but don't just post for the sake of posting. Remember, some things are better left unsaid. If you don't know something, mind your place and let someone else answer.

Grn Xtrm 84 Posting Pro in Training

Ok your code has a few problems with it. First put this at the top of the code

#include <iostream>
using namespace std;

Next change you variable input to x. This is the variable that will be entered by the user and tested by the if statement.
Next xhange the first if to a while loop and move cin>>x into the while loop.
Then use your current if/else to test the input.
Finally put return 0; before the final right brace }
Your main problem was leaving cin>>x outside of the while loop. You need it in the loop so you can enter many numbers.

Towely commented: You're awesome, thanks! +1
Grn Xtrm 84 Posting Pro in Training

If lines 36 and 44 are supposed to be function calls, you need to put () after the function name. Please correct me if I am wrong, but I think thats the problem.

EDIT
You will need to put in a parameter as well. MAke sure it is the same data type as the one in the function definition.
Sorry I missed that at first glance/

Grn Xtrm 84 Posting Pro in Training

Hey nice code. To add it as a code snippet start a new thread and click the drop down arrow that appears on top. From there select code snippet.

Grn Xtrm 84 Posting Pro in Training

Sorry about your parents but they really do care about you and make decisions that they believe are in your best interest. Although I don't consider sex to be a delinquent act, sknake is right in that you should obey your parents' wishes and try to make them proud. Eventually they will let you be you. I went through a similar experience during my teen years. You'll get your independence soon enough. ;)

Grn Xtrm 84 Posting Pro in Training

He wasn't being rude, he was just telling it like it is. You should grateful that he told exactly how to do the problem, not mad that he made a comment about your major. Follow his "angry ordered list" and you should be able to solve your problem. Also, next time you have an assignment, don't wait until the day its due to start asking for help.

BestJewSinceJC commented: Thank God for computer majors. :) +4
Grn Xtrm 84 Posting Pro in Training

I dont believe that you would get an assignment in c++ if you never had a class relating to it. Show some effort and we will try to help you. Also, try searching the forums for this question, it seems to show up quite a bit. In the future you may want to pay attention in class and try to learn something,

Grn Xtrm 84 Posting Pro in Training

I know that like the rep points, anyone can give you whatever points they want, negative or positive, but I find it strange that someone decided to down vote a post that is 1 year old without a single explanation.
At least with the reputation system you get to describe the reasons for your selection.

Yeah but then there are the people who give you negative rep because they don't like your signature. :icon_rolleyes:
http://www.daniweb.com/forums/post1024213.html#post1024213
Not that I'm complaining or anything ;)

Grn Xtrm 84 Posting Pro in Training

Test if the number is even or odd using the modulus operator.
If the number % 2 equals 0, then the number is even.
If the number % 2 equals 1, then the number is odd.

Grn Xtrm 84 Posting Pro in Training

Anyone know what Algorithm Verification implies?:-/

To make sure the algorithm is a valid solution to your problem. Type code based on your algorithm to see if the algorithm actually works in a real program. If it doesnt work, the algorithm is flawed and must be re-written.

Rashakil Fol commented: you forgot about top-posting, ya fascist -1
kvprajapati commented: N/A +6
Grn Xtrm 84 Posting Pro in Training

Hi,
I have a question on writing a c++ program can anyone give me a hand?

Don't you think the c++ forum would be a better place for your question?
We will be glad to help you if you show effort and don't expect us to do the whole program for you. By the way, next time you need help writing a program you may want to tell us what the actual problem is.

Grn Xtrm 84 Posting Pro in Training

This question seemingly has nothing to do with c++. In the future dont post math related questions in the programming forums.
As for your problem, what does the question ask you to do? Do you have to solve for the variable r?

ankur_ commented: c +1
Grn Xtrm 84 Posting Pro in Training

The problem may be resulting from the fact that there are only 9 planets and the loop is iterating 10 times. That is, the array has 9 elements, but the for loop is counting 10 times. Try changing <=9 to just <9. Let me know howit goes.

gibson.nathan commented: great posts, very helpful +1
Grn Xtrm 84 Posting Pro in Training

This forum is for game development. It is meant for people who are facing difficulties while making thier own games. If you are having a problem with your hardware post your question in the appropriate Hardware forum. Thanks.

Grn Xtrm 84 Posting Pro in Training

Can you please tell me what you are trying to accomplish with this program?
If all you are trying to do is print the string then you can use this

#include <iostream>
using namespace std;
#include <iomanip>
#include <String>

int main ()
{
system("cls");

string Object;
cout << "Enter the object you wish to create: ";
cin >> Object;
cout << "Initializing \"" << Object << "\"" << endl;
cout << "Initailization Complete" << endl;
cout << "Compiling \"" << Object << "\"" << endl;
cout << "Compiling Complete" << endl;
cout << "Creating \"" << Object << "\"" << endl;
cout << "FATAL ERROR IN C DRIVE" << endl;
cout << "ABORTING CREATION OF \"" << Object << "\"" << endl;
cout << "Program succesfully aborted" << endl;
cout << "Hard drive wiped to protect computer" << endl;
cout << "Have a nice day." << endl;

char wait; 
cin>>wait;
return 0;
}

The last part with cin>>wait stops the screen to let you read the output before the screen closes.
Disregard Phil++'s code. It won't work because he messed up the quotes.
@ Phil++
If your gonna give away free code, the least you could do is make sure it actually works.
This isn't the first time you disobeyed the rules by giving away code.

Grn Xtrm 84 Posting Pro in Training

Why don't take a shot at coding the program and report back with any problems you encounter. Don't just type your homework assignment up and expect someone to do it for you.

Grn Xtrm 84 Posting Pro in Training

yeah your right.
so "processScore" needs to be in main right?

That's where I'd put it.

Grn Xtrm 84 Posting Pro in Training

Do you have a question about this code? Or were you just sharing a personal anecdote? Generally, the software development forums are reserved for people to ask questions to try to fix thier code. But yeah, sometimes the most obvious solution is the correct one. In fact that quote was my signature a little while back ;)

Grn Xtrm 84 Posting Pro in Training

Number of the Beast by Iron Maiden. This is the next cover my band wants to do, so I gotta learn the bass line by Friday. Making good progress. :)

Ezzaral commented: Great song! +0
Grn Xtrm 84 Posting Pro in Training

Sounds good :) I'll be starting piano lessons soon, expensive though. When I'm bored, I'll try something new, for example i've started getting into photography now, here are some I've taken fairly recently.

William, great pictures. I especially like the Lighting up the Path pic. They look very professional. Keep up the good work.
Also, good luck with piano. Learning an instrument takes lots of patience and practice.

Grn Xtrm 84 Posting Pro in Training

Is that so...??? I didn't know it... Thought he too is one among those guys who post their requirements and ask us to code... ;)

Well he was originally. I had to post and ask him to show effort. Then he slopped some code together and posted it.

Grn Xtrm 84 Posting Pro in Training

Ok ... So ?

He posted his code in the Geek's Lounge for some reason. Without code tags of course. ;)

Grn Xtrm 84 Posting Pro in Training

Hi there
Please, can someone help me with my Computer Science class 160?
It's about machine cycle (LOAD, ADD, JUMP...) and algorithm.

Start a new thread, this one is 7 years old. ;)

Grn Xtrm 84 Posting Pro in Training

Remember, I was trying to get people talking. I wanted your opinions, not to convince you I was right.

Well you definitely got people talking. This thread recieved more than 150 replies in only 9 days. I just hope you learned something useful from this experience. Hope to see you around the software dev forums in the future. (remember no outrageous personal opinions, just help for those who need it) ;)
Regards
~Tom.

Grn Xtrm 84 Posting Pro in Training

Thats what we are here for. Great working with you.

Grn Xtrm 84 Posting Pro in Training

Bible game? Sounds boring. ;)

Grn Xtrm 84 Posting Pro in Training

What I cannot understand is why this idiotic discussion has been allowed to continue, the OP is eithera troll or a narrow minded person who is unable to accept the views of others. Close the thread please!

Agreed, this thread stopped being entertaining about 12 pages ago.
@The Mad Hatter
This is a vast community. You should share your knowledge and help people who are having problems with their hardware or programming problems. Just don't impose your views on people there. They ask questions and you provide assistance. And bouns: you get to be mean to people who don't show effort on their work. What more can you ask for? ;)

nav33n commented: correct! +0
Grn Xtrm 84 Posting Pro in Training

I hate it when they write the assignment word for word and don't even try to venture a guess. :@

Grn Xtrm 84 Posting Pro in Training

OKOK,, fine, you made your point. i am going to the black market to get some help.....

Don't do anything illegal. I'm sure you can find a new dog talk forum to participate in. Remember, living well is the best revenge. Join the new forum and become an outstanding member. Build up your rep as the biggest dog fanatic on the internet. Then your old forum will beg to have you back. ;)

Grn Xtrm 84 Posting Pro in Training

Scroll to the bottom of the page and click the link that says Mark As Solved (or something like that)
It will be after the last post. Thanks.

Grn Xtrm 84 Posting Pro in Training

Glad to help. Please mark the thread solved if you have no further questions. Thanks.

Grn Xtrm 84 Posting Pro in Training

Try changing line 8 to:

Scanner scan = new Scanner(System.in);
EGutierrez91 commented: thanks! +0
Grn Xtrm 84 Posting Pro in Training

You have over 200 posts and should have known the rules and that posts are not normally deleted unless they violate DaniWeb rules.

You are right, sorry to have wasted your time. I will be more careful when posting in the future. Thanks again.

~s.o.s~ commented: For taking this all in good spirit... +0
Grn Xtrm 84 Posting Pro in Training

LOL. This code is half C and half C++. Maybe call it "C squared ++" ;)

Grn Xtrm 84 Posting Pro in Training

I just gave some parts to help the OP get started. He needs to figure out how to use if statements to check illegal inputs and how to find the smallest number in the array. At the very least I introduced topics such as arrays that the OP can do further research to learn more about. Sorry if the post was bad.

BestJewSinceJC commented: Nevermind, it was a misunderstanding. +4
Grn Xtrm 84 Posting Pro in Training

Their best interests also has to satisfy our best interests, or they will quickly lose users, so no I don't agree. A good OS will attract more users, and it's not like Microsoft hasn't got enough money to provide us with a good one.

Well, obviously they aren't gonna purposely make a poor product just to spite us. ;)
They want to make a good product so they will make as much money as possible. That's what big corporations care about. MONEY. And the best way to make alot of money is to make a good product that lots of people will buy. I agree with you there.

Grn Xtrm 84 Posting Pro in Training

Heh. Of course I'm anti-Microsoft! I have seen the light children, and the light is FREE SOFTWARE! Protect us from the EVILS of the Proprietary Software Manufacturers WHO SELL US OUT TO THE RIAA and install SPYWARE (Windows Genuine Disadvantage) on our COMPUTERS!

Obviously you are anti microsoft. But you never admitted to being a troll. ;)

Seriously though - do you trust Microsoft? Do you trust Apple? You shouldn't. They are working towards their own best interests, which quite probably are not your best interests.

Of course I don't trust them. They are large multi billion dollar industries. Finally, something I can agree with you on. :)

Of course you can trust me, I'm a paragon of virtue, and would never mislead you.

LOL. Hey, your kinda funny when your not raving like a lunatic. ;)

Grn Xtrm 84 Posting Pro in Training

As to your Linux lab - I note that you didn't compare the hardware. I saw one lab like you are talking about, where all of the Linux machines were old P3 units, and the Windows machines all Core 2 Duo. And yes, people were wondering why the Linux computers were slower!

How would you know what kind of computers are in the labs at my school? They are actually all the same but nice try.

Oh, and a correction. I don't call people trolls because they like Windows. I call people trolls because of their actions.

OK, then you are an Anti-Microsoft troll... because of your actions, of course.

Grn Xtrm 84 Posting Pro in Training

This is rather amusing. I posted a long, insightful write up on why I don't use Windows. And guess what - my reputation is instantly modded down. Now why would that be. Is it possible that Microsoft Trolls hang out here?
I think so.

Maybe there are people out there who like Windows. Is that allowed?
There is a Linux lab at my school and those computers are slowest machines I ever used. Every other room in the school has computers that run Windows and they work much better. In my experience Windows is much better than Linux. But hey, that's just me. I'm sure others have had great experiences with Linux.
People are entitled to their opinions. Don't call people trolls because they like to use Windows.

Grn Xtrm 84 Posting Pro in Training

Read this if you have trouble finding the compiler or have any other questions
http://www.daniweb.com/forums/thread99132.html#

Grn Xtrm 84 Posting Pro in Training

Do you have the java compiler downloaded? When I first started Java I had trouble finding the compiler online (i think it was called JDK or something like that). You need this to run java code and I dont believe it comes with Java implementation environments such as Jcreator, TextPad, etc.

Grn Xtrm 84 Posting Pro in Training

I doubt having a good job related to technology is the reason for your cousin's health problems and physical appearance.

niek_e's sarcastic comment is right. Life expectancy is much higher today because of advances in technology.

Grn Xtrm 84 Posting Pro in Training

Please tell me the major difference between the capital character with single inverted comma and double inverted comma in a C Program.

They are called single quotes and double quotes. ;)
LOL. Inverted comma...

Grn Xtrm 84 Posting Pro in Training

Don't think that you need a teacher to learn programming, I'm totally self taught, meaning I can go at my own pace. If you do the same, you'll probably find yourself going at a faster pace than in school.

Thanks for the words of encouragement William. I've gotten quite good at C++ and Java by continuing myself after learning in school. I always wanted to learn Flash but never did. Maybe I will try during the winter break from school. I'm a little preoccupied with C and Linux now. ;)