Forum: C Mar 23rd, 2009 |
| Replies: 5 Views: 433 Well, that because you used the scanf function to read the value. The quick solution for this is to place two getch or getchar()! Or you will have to call the following function just above the... |
Forum: C Mar 22nd, 2009 |
| Replies: 3 Solved: Help please,,,,,,,,,,,,,, ,,, Views: 270 Re: Help please,,,,,,,,,,,,,,,,, >how do i save the c programs i compiled on borland c++ on the dekstop???????????????????????
Well, when you compile the C code you would the binary or the .exe file out of it. Unless you have any... |
Forum: C Sep 28th, 2008 |
| Replies: 4 Views: 7,175 Use sprintf function to convert int to string. Thats the more portable way of doing it. Since itoa is not portable!
char *cvtInt( char *str, int num)
{
sprintf( str, "%d", num );
}
... |
Forum: C Sep 28th, 2008 |
| Replies: 12 Views: 1,122 YES it is :) Perhaps the OP should check the value of n, before sending the value to the fact function.
print "Value for n ?"
read n
if( n >= 1 )
print fact( n )
else
Error |
Forum: C Sep 28th, 2008 |
| Replies: 12 Views: 1,122 Well, you got to be pretty careful on what your placing in the recursive function. The function is built to find the factorial for a given number. Tell me what are you trying to achieve.
Why do... |
Forum: C Sep 27th, 2008 |
| Replies: 12 Views: 1,122 Well there are few thing which you need to consider. First of all the function name is not write. In you code you have declared a function prototype clearly, but why dosn;t that reflect in your... |
Forum: C Sep 27th, 2008 |
| Replies: 12 Views: 1,122 int return1 (int n);
Why is that semicolon there??? Delete that! Syntax error
ssharish |
Forum: C Sep 26th, 2008 |
| Replies: 12 Views: 1,122 Perhaps you should make an effort to search on the form. There might be like tons of results on this issues. But here is the pesudo code.
<return type of int> function name FACT ( taking int as... |
Forum: C Sep 7th, 2008 |
| Replies: 5 Views: 529 You dont have to have such a huge list if and else to do this. You to reduce that to just few lines of code. Looks the my version of convert function.
int convert( char *str, int *number )
{
... |
Forum: C Sep 7th, 2008 |
| Replies: 2 Views: 500 scanf("%d", &miles);
You need to read double here. But you are reading integer. Or at least change the type of miles here to integer. You might actually expect some meaningful result.
And... |
Forum: C Jul 25th, 2008 |
| Replies: 8 Views: 1,033 Well, i could see some other problem as well now with that code. Can you please post the error message please
ssharish |
Forum: C Jul 25th, 2008 |
| Replies: 8 Views: 1,033 #define GCD();
Take of that semicolon from that statment. Macros donst need a semicolon. If your marco definiation are like too big then you might use a '\' to speak it up and concatenate.
But... |
Forum: C Jul 24th, 2008 |
| Replies: 15 Views: 1,398 pLike, you should really consider looking at on how to indentent you code first. Well the error message you get there is basiclly specifying that GetInteger cannot be assigned to the interger. It... |
Forum: C Jul 23rd, 2008 |
| Replies: 8 Views: 1,033 Perhaps, you should have posted this question on a C++ form :-/.
And few things which I saw in your code, which you might have to consider to correcting
#include <stdio.h>
to
#include... |
Forum: C Jul 23rd, 2008 |
| Replies: 5 Views: 666 I don’t have much to say, b’cos most of the clues on why this happened has been already pointed out. But the main cause for this problem is when you run the code once and then try running it once... |
Forum: C Jun 24th, 2008 |
| Replies: 2 Views: 442 It would have been more nice, to see what problem you had. May be we could learn more from that as well. Please do post the problem and the solution you came your problem. You might get some more... |
Forum: C Dec 26th, 2007 |
| Replies: 7 Views: 1,800 YES, it does say to prototype there
http://linux.die.net/man/3/get_current_dir_name
ssharish |
Forum: C Dec 21st, 2007 |
| Replies: 3 Views: 4,225 Jobs you are in a right track. Thats right When do this
void foo(FILE *fp);
in main
foo (fp);
When you call foo the address of the file pointer will be copies and sent to the foo... |
Forum: C Dec 21st, 2007 |
| Replies: 15 Views: 1,712 Well, C supports in multi threading. But before i can say anything about light weight process. I should ask you which OS and compiler are you using.
If you are on Linux, you should looking at... |
Forum: C Dec 17th, 2007 |
| Replies: 4 Views: 725 i cant unzip it on my machine, just use the windows compress utility feature. Or perhaps just post the make file contents
ssharish |
Forum: C Aug 9th, 2007 |
| Replies: 4 Views: 1,948 Why do u want to place that in a 3 byte stream when that can fit in 2 byte stream.
ssharish2005 |
Forum: C Aug 9th, 2007 |
| Replies: 3 Views: 628 I am seeing this as a second post now. :)
ssharish2005 |