The while loop I have does what it is supposed to do but in a very round about way. I have a while loop(inside a function) that is supposed to call another function for two random numbers(1 - 6). It...
Type: Posts; User: bmancl
The while loop I have does what it is supposed to do but in a very round about way. I have a while loop(inside a function) that is supposed to call another function for two random numbers(1 - 6). It...
Thanks again for the help. Once you showed me the correct declaration it was smooth sailing.
Thank you very much for the reply. I was declaring the word_search function totally wrong. So I was getting mismatched variable warnings.
FILE* word_search(FILE*); //for example
So I wrote a...
I have been struggling with pointers so I hope someone can give me a hand. I am trying to write a program that first asks a user to input a filename. It then checks if the file exists and if it does...
If you look at my first post I left the original working code with a function in but I // it.The assignment is to remove the function from the code and use two macros. One to compute the factorial...
What makes this problem is just that; most people are against using macros so it is very difficult to find any resources or help on the subject. So far I have a pretty good grasp on C programming but...
I have to do it this way. I would rather use functions but this is what the instructor wants. Here is what i have so far
#include<stdio.h>
#include<math.h>
#define fact(x) for(j=(x-1); j>=0; j--)...
You are right. I could only find examples of do while loops and I have been searching for a long time. I have been trying to not use a loop in the macro like this
#include<stdio.h>...
I am really struggling to grasp this problem. There has to be a loop somewhere. Either in the macro or main and I think that is where I am getting lost because I don't know how to set up a loop in...
Thank you very much for replying. Should I use a for loop instead? I guess I am kind of stuck on how this type of macro works.
I cannot find any good info on how to setup multi line macros. The problem I am having is that I need to use only macros (no functions) to compute factorials. When I use functions the code works but...