Forum: C Mar 23rd, 2009 |
| Replies: 2 Views: 328 Well, there are certain ranges that the bluetooth can cover according to the standard. There are two type class1 (covering 100m) and class 2(covering 10m). I suppose you can try experiment those... |
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 23rd, 2009 |
| Replies: 11 Views: 793 Ok, this looks a bit more sensible. So as you can see that you don’t have to read anything from the first two lines of the file. You really need to extract the information from the third line.
... |
Forum: C Mar 22nd, 2009 |
| Replies: 11 Views: 793 Well, it donst make any sense of the input file that your trying to read with regards to the student grade information. If I was you, i would go your lecture and speak about on how the input file... |
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 Mar 22nd, 2009 |
| Replies: 6 Views: 484 Well, if you are trying to executing those DOS command through your code. The only piece of work which you will have to do is to format the command and then look at the directory structure and then... |
Forum: C Mar 22nd, 2009 |
| Replies: 4 Views: 294 /[.].*\(15\).*\(53\).*\(92\).*\(=>\)
This would still wouldn't give you the right answer? Its expecting all the search charcters to be in the same line. Look at nucleon post.
-ssharish |
Forum: C Mar 22nd, 2009 |
| Replies: 4 Views: 301 >My question is: If i'm the customer, how can i edit the quantity shown on the overview so that i can afford to pay the totalprice(if i've ordered too much) and delete some on the overview if i want... |
Forum: C Mar 22nd, 2009 |
| Replies: 2 Views: 317 >Please suggest the addValue definition to accommodate this change
Looking at the way you call the function. The function definition should look like:
void addValue(struct Info **info, char... |
Forum: C Sep 28th, 2008 |
| Replies: 4 Views: 1,083 So if the flag matches, you can get the argument by the global variable optarg. That should hold pointer to the argument which you are looking for!
filetype = optarg;
ssharish |
Forum: C Sep 28th, 2008 |
| Replies: 3 Views: 562 Look at the ncurser library, that should give much control the console window. So that you could move your cursor around to locate the value on the screen.
I assume your working on Linux/UNIX... |
Forum: C Sep 28th, 2008 |
| Replies: 4 Views: 7,187 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: 6 Views: 10,888 Have a look at this thread (http://www.nabble.com/Unresolved-inclusion:-warning--with-CDT-5.0-(Ganymede)-td18404356.html), should be the same problem your facing as well. The GCC should have been... |
Forum: C Sep 28th, 2008 |
| Replies: 4 Views: 1,533 Here is a link (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1048384015&id=1043284392) which could give you some hint!!!
ssharish |
Forum: C Sep 28th, 2008 |
| Replies: 13 Views: 1,365 Thats the only way which i can think off, which could be portable to certain extent. But as you say if it was used in some event driven cases then probably it might hang (Need to hit enter, since... |
Forum: C Sep 28th, 2008 |
| Replies: 6 Views: 641 Why the hell would you cast the malloc. You shouldn't do that! Read this (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1047673478&id=1043284351).
@OP for me most of of the things seems... |
Forum: C Sep 28th, 2008 |
| Replies: 5 Views: 637 Huh???
If you been programming for an year and you seem to consider a good programmer. But still you are not that confident enough!!! I would say go engae youself with some personal project and if... |
Forum: C Sep 28th, 2008 |
| Replies: 13 Views: 1,365 Use this instead
void clrInputBuf( void )
{
int ch;
while( ( ch = getchar() ) != '\n' && ch != EOF );
} |
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 23rd, 2008 |
| Replies: 2 Views: 416 As I can see, you are calculating the X axies values right, but not the Y axies values. Which dont incrment the values a bit more in the Y axies values to suit your requirnment. The following is the... |
Forum: C Sep 7th, 2008 |
| Replies: 2 Views: 572 Hmmm seems like that need to implement a lexical and a syntax analyzer. Have a look at compiler design concept.
ssharish |
Forum: C Sep 7th, 2008 |
| Replies: 3 Views: 923 hehe cheers ArkM :)
ssharish |
Forum: C Sep 7th, 2008 |
| Replies: 8 Views: 685 Well, algorithm can be implemeneted in any language, its just not in C++. I have implemented the same algorithm in 3 different languages. Follow the link to find the way to convert... |
Forum: C Sep 7th, 2008 |
| Replies: 3 Views: 923 HAHA what is Ant Clustering algorithm. Never heard of it before. But any way, no one is gonna give you the code unfortunately. People are here to help but not to pass on the code. Have you go any... |
Forum: C Sep 7th, 2008 |
| Replies: 8 Views: 685 What I can understand, is that your are looking for something called Infix to postfix expression. And then solve or evaluate the postfix expression. The postfix expression can be evaluated very... |
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: 3 Views: 439 It looks like that he might have his own SDL and API by the looks of it.
@OP - What does this code do?
ssharish |
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 Aug 3rd, 2008 |
| Replies: 9 Views: 1,034 Well, if you don't have any experience of working on embedded programming. You should start get some book on PIC controller and learn. Embedded programming is something different programming paradigm... |
Forum: C Aug 1st, 2008 |
| Replies: 9 Views: 689 The only thing which you need to work around is to find the no of digit after the decimal point. If you can get the no of digits you could pow function to get the denominator and the numerator would... |
Forum: C Jul 28th, 2008 |
| Replies: 17 Views: 2,666 >simply wouldn't compile without explicit typecast to (char*).
Which compiler are you using??
ssharish |
Forum: C Jul 28th, 2008 |
| Replies: 9 Views: 983 Well why dont you use a library function from math.h.
#include <math.h>
...
...
sqrt( 4 );
ssharish |
Forum: C Jul 27th, 2008 |
| Replies: 12 Views: 1,523 Haha, here we have one more homeword thread?
Dapsigar, show us a bit of progress on this assignment. You could expect some more help!
ssharish |
Forum: C Jul 27th, 2008 |
| Replies: 12 Views: 9,622 Well converting hex to binary is just problem. But there is one more reason. It is difficult to remember the binary pattern. So we group them to form it small number which still referees the same... |
Forum: C Jul 26th, 2008 |
| Replies: 8 Views: 1,311 accho, as I said before, writing data onto a file either in binary or ascii is not gonna make a difference apart from few kila bytes. If your are really considered reducing the file size you need to... |
Forum: C Jul 26th, 2008 |
| Replies: 2 Views: 1,136 Try atof. See if they get the same answer. As said before it an implemenation issue.
ssharish |