1,358 Posted Topics
Re: [QUOTE=rookanga;1035744]my assignment says to "Finish the header block on the function. " What is the header block? Is it the // (write information) or is it something else?[/QUOTE] It's the very first line of the function. Some also consider the non-required pre:/post: statements to be part of it as well. … | |
Re: On line 29 you're converting your input angle to radians TEMPORARILY to display it, but you are not storing the result value any where. As a result, when you call distance_earth(), distance_moon(), and distance_mars(), the angle is still in degrees. You must find a way to do a permanent conversion … | |
Re: The comment blocks say to copy the code from the book. Have you looked in your book for the bubble and exchange sort algorithms that your instructor wants you to use? Once you have done that, it's as simple as adding the line [icode]exchanges++;[/icode] to the appropriate places in the … | |
Re: [QUOTE=sexyzebra19;1027626]Hi, I've tried to make a program that inputs two 3D vectors and then calculates various norms of the first vector, and the dot product and addition of both vectors. My code is working fine when everything is put into the main, however I wanted to create some functions to … | |
Re: [QUOTE=Epi23;1024566]Ok, so I am trying to write a program that will solve simple math and physics problems, and am trying to use strings and words more, so my question is: is it possible to use a char in an if statement? I'm new to this so yeah. Here is what … | |
Re: Just a couple things I noticed right off, dkalita mentioned a few others 1.) You need to declare your main as [icode]int main()[/icode] and then add a [icode]return 0;[/icode] at the end of the function. The main must return an integer. 2.) Your includes are messed up. You need to … | |
Re: Are you using the [icode]<string>[/icode] header? If so, have you tried using [icode]filename.c_str()[/icode] to get the actual string characters rather than the array? |
The End.