More or less, all my C primer Plus 5th edition book tells me about .h files is why you'd use them, how not to use them, and how to call them in a program. I'v not come across anything in it. And...
Type: Posts; User: NinjaFish
More or less, all my C primer Plus 5th edition book tells me about .h files is why you'd use them, how not to use them, and how to call them in a program. I'v not come across anything in it. And...
Does this mean header files go into a specific type of filer, or is it just a text document? Because from what i'v tried, it didn't work.
I'v had my guesses at how .h files work. I'v read up why to use them, however i'v not come across any good explanation that says "Here dummy, this is how you make them work".
My initial guess is,...
Just for the sake of wanting my own programs to not scroll off endlessly (Gets annoying after a time), I am wondering if C has any way to pause the program after it scrolls through a determined (or...
Thanks alot. I'll give this a good looking over and hopefully I can use this to make my own table and such. Thanks alot :)
Well as of now I can't do anything. Since my I'm going to have to use pow(), I need to convert my code to double. However, doing so doesn't seem to be producing the same output I want (as in, it...
Its given in percent, and apparently that is supposed to change it do decimal(Thats what the explanation with the formula said anyways.
And floating point was optional of three others to make the...
Well I just tried changing the variables from 'int' to double, and everything just went to hell.
Don't worry, took me a few hours of typing principle into my code to get used to typing it right.
edited
Ah, I assume pow uses double, since i'm getting conversion errors all over the place now *facepalm*
I would of done with with scanf and printf the entire time if I could of aha. It's a requirement, which is stupid, I know.
And term is entered by user.
A few of those term's didn't really make much sense to me, unfortunately, lol.
As of right now, no. I tried
payment = (myarray[0] * myarray[1]) / 1 - (pow(myarray[1] (-myarray[2])) );
However, now 'i'm getting myarray[1] cannot be used as a function' and it worked a minute...
I probably should of pasted my entire code, I will if you'd like, but it's because the requirements of the program require me to use a separate function to get the three data values you said, and...
There are also dozens of variations to that, such as --i, ++i and i--.
It's also why I said my loop is probably wrong. You didn't really say anything I hadn't already pointed out.
As of right now, i'v spent the better half of the past 24 hours trying to make my program output the right answers to a given formula, using printf. I'll post the given equation, what I got out of...
Thanks for clearing that up :).
Also, now i'm running into a few compiler errors on the 'while' section.
do{ //Printf showing options to user as what each number represents for...
Excellent idea :). My book actually never mentioned Do loops, and in C++ I never understood the difference between do and while loops. But I def see why you'd use them more often in C :). Thanks alot!
I'v been altering my program (for my own reasons I suppose. Just trying to get some more understanding of how different things work). At first, it worked fine, still does except for one small...
Nevermind, can be removed. just figured it out
Now I understand what you mean. I never realized that the values we're automatically passed into the main function this way. I thought you had to return the entire array back. But changing my return...
So keeping my int menu(void) function the same will still work?
Because after changing each element in the array to what I want it to be, I return myarray[]; but the program will either compile and...
Oh alright.
I guess this means I could simply just use int menu (int *myarray, int size_10) and it will give me the space I need to store them
Also, do I need anything specific in my menu function for the...