Thanks for the help. :)
Type: Posts; User: dana_h
Thanks for the help. :)
Is it possible to write a function deffinition which includeds a function as an argument ?
for ex.
typedef struct item item;
struct item{
......... }
item *add(item *p1, item*...
I still don't know why that way is not working
but I fixed it with an internal function instead.
I would still like to know why this isn't working.
*************************************...
I know ,I know int main is better but we can't use in this course.
so I'll have to keep void main. sorry.
quzah,
thanks for the MUCH better date check.
QUOTE]
I have attached a program (unfinished)
I have a problem in the second case that I can't fix.
I tried everything I know.
I think the problem is it can't receive the right info even thoug it...
sorry it took me so long to reply.
I don't have a compiler at home.
Thank u for the help, Hammer.
I have attached my more extended program.
I'm having a problem. it doesn't accept my 2nd...
I did the changes and it just goes crazy.
I think it's best just to post the function.
Hopfully after this I will be able to do the remaining 5 functions
all by myself.
(I thought the...
1. my loop now looks like this : "for(;getchar()!='\n'; )".
2. I initialised "choice" and used "while (getchar() != '\n');" after
"scanf("%s", &date);".
now it stoped double printing...
oops....
forgot to register before.
I wrote part of a bigger program and it has a few problems:
1. double prints the menu.
2. where the user has to print y to continue it prints the Q but
automaticaly continues.
I don't...
Hello,
New problem.
maybe it's stupid but I'm stuck.
I want to write a long int varriable into a file, do I need to transform it to binary take the lower 8 bits and using fputc print and...
You're right.
I was so happy when it worked twice I just stopped. should have tried a few more times
Thanks.
I had to do something similar. maybe it will help you:
int number=1;
while(number<=10000){
if (number<test*2)
{
printf("%4d",number);
i++; ref++; test=2;
}
Thanks. I forgot that :o
Wow,
I'm impresed.
I'm a student too and at the very begining of Cprog.
That's why I ask so many Q.
I did make some stupid mistakes but now after much help
I got it right, it's pretty long but...
Following your advice:
I changed my ints to floats and did a little editing.
It works.
I do get the answers for eg. "245.000000"
but who cares IT WORKS.
Thanks for the help.
All of you.
I changed my function and it works great :D
Thanks !!! (I'm so happy)
I am new to C and have no idea what %lu means.
We haven't learned it, therefore I can;t use it.
Maibe if I knew what it does I could write it difrently (not %lu).
If the poly was enitiated it should evaluate it and if it wasn't
since it is zero based it should return "0".
This is part of the code which uses EVALUATE :
/*The following program enables ...
Thaks.
I'm going to try something like that.
Atleast now I know how to do it.
I hope it will work :)
I need to evaluate a polynomial for eg.:
2x^3+4x
x=2
I should be getting "24"
what I get are completley crazy numbers "12471158" or "0"
I've tried it but it doesn't work.
Thanks anyway.
Hi,
it's me again...
Can someone help me to find why I don't get the
return I need?
int EVALUATE (int poly[],int num) {
int i,m,temp,total=0,result=1;
I have to receive anything frm the user and when I get garbage the function should stop.
that's why I've used "scanf %s".
It does ignore the garbage but it doesn;t stop untill it receives 9 valid...
I tried it but it still doesn't work.
Actually none of the restrictions work.
(It's really sad.)