yeah, that does fix everything, would have done it myself, lacking a good calculator, i figured the program could do it.
To be clearer, that revealed the error, namely a stray parenthesis.
EDIT:...
Type: Posts; User: Nicheter
yeah, that does fix everything, would have done it myself, lacking a good calculator, i figured the program could do it.
To be clearer, that revealed the error, namely a stray parenthesis.
EDIT:...
Oh, why is that?
Yeah, the aforementioned edit didn't work... It gives me a syntax error...
Hmm, really? It seemed like it worked, but I'll try that.
EDIT, yeah, it doesn't work, but how does pow take arguments?
edit2: ah, rewritten as
f=pow(pow(2,(1/12)),i)*130.813;
Ok, easiest way is to use only one array, due to the formula working in half-steps, setting the initial value to that of low C means that I can use the position of the array when it evaluates as the...
Ah, thanks! Calculating the values may be worth researching, otherwise the Structure would be best (I was going to try and learn it soon anyways)
For the record, the formula seems to be (using A...
Yeah, I figured it out. I accidentally added a character to the if statement. Thanks guys! '
EDIT: Continuing in the vein of not wanting to start a new thread, somewhat related to this one, I need...
Whoops!
should be
if((reformed = fopen("c:\\reformatted.txt", "w+"))==NULL) {
printf("Error Creating Output File!\n");
Sleep(500);
...
Would
if((reformed = fopen(argv[1], "r+"))==NULL) {
printf("Read Only Directory\n");
Sleep(500);
exit(1);
Resolve this...
Here's the entirety, gcc -Wall doesn't complain, I don't think its the program's fault anyway...
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <string.h>
int main(int...
it outputs a file 'reformatted.txt' and a search of the entirety of the computer turns up nothing. After checking the program's execution one more time, it does seem to be executing properly, just...
Well, thanks! One final, unrelated, question:
if i use my main statement as
int main(int argc, char *argv[])
it allows me to take command line arguments, and works fine. But if, using windows,...
Thanks guys, but Vart, isn't your solution even longer then the initial example?
Ah, well, that's a good tip, thanks. One other question, while I'm on the subject of strings. Is there any way to do multiple string comparisons in a shorter form than, for example, ...
Thanks, that fixed the problem. I'm new to strings, so I should've checked that first...
If I define a string as
char found[100];
and then proceed to try
if ((int) found[7]==80))
{
printf ("%s",found);
}
It should only occur if the seventh char in found is P, whose ascii...
well, that makes sense then. I'm trying to use something from the wrong language...
Could someone explain the proper usage of getline? I am trying to use it, but i do not understand it's formatting.
Thanks! But how should I handle it?
Better? EDIT: Runs fine now... Thanks for all your help!
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (void)
{
char word[21];
char wordtocheck[50];
Ok, I forgot to do that. Changed "%s" to match the sizes.
I use Dev C++, It doesn't like indenting properly. Suggestions on a better IDE? Also, where do I not have a curly-bracket newline?
Ah, Thanks Elysia. What did I do wrong now? Won't go through second while loop...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main (void)
{
char a[21];
char b[50];
Ok, back to fscanf code, which worked somewhat. Someone explain how fgets should be used in this situation, please? Fscanf is more suitable because it searches up until whitespace, which is what I...
robwhit, i don't understand the question. What happens when there are more than 16 synonyms to what? Elysia, you suggest changing, but I did and now the code is even worse off then before. How do you...
the thesaurus is moby thesaurus, all spaces in words changed to be _ and all , replaced with a space