- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 12
- Posts with Upvotes
- 12
- Upvoting Members
- 10
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re: Well, the pesudo code should be converted to a code and then try with some test input. Well, YES, you cant just compile a pesudo code. So on what language are you suppose to implement the pesudo code. There are few tools which converts the pesudo code to code. But, … | |
Re: Here is sample code, which demonstrates on how to get a the ASCII code for the entered char. [code=C] #include <stdio.h> #define TRUE 1 void clear_buffer( void ) { int ch; while( ( ch = getchar() ) != '\n' && ch != EOF ); } int main() { unsigned int … | |
Re: 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 work on this algorithm that you on done? Post them here. … | |
Re: [code="C"] void printB( int num ) { if( num == 0 ) return; else { printB( num / 2 ); printf("%d", num % 2 ); } } [/code] You could solve the problem of you binary values printing in reverse using the recursive function. Have a look the function above. … | |
Re: Jobs you are in a right track. Thats right When do this [code] void foo(FILE *fp); in main foo (fp); [/code] When you call foo the address of the file pointer will be copies and sent to the foo function. If you wanted to send it through reference then you … | |
Re: Ok, try deleting your cookies and files. hopefully you should get you internet connection back again. This happenes quite often if you dont clear them for very long time. [code] Tools->Internet Option->Delete button-> <click> Delete cookies Tools->Internet Option->Delete button-> <click> Delete history [/code] Close down all your internet explore and … | |
Re: Until you indent you i dont think your going to get any help from here. Indent you code. I can’t compile this code as the code will never compiler. Python is strictly indent specific. I suppose you should know that by now. Indent your code and post again! ssharish | |
Re: I've never Django before, but straight getting into web develpment uisng some API would be off starting from far up than from the basics. I would suggest you to have a look on some tutorials on html create a few simple web pages and then try do some CGI scripting … | |
Re: [code="c"] GROUP *current = NULL; [/code] You have declared this current pointer and you havnt allocated memory for it and again in the groupcon function you are trying to derefrence the null pointer which is an undefined behavior. Allocate memory in the main and then tru current to the groupcon … | |
Re: 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 | |
Re: [QUOTE]# include <stdio.h> is an "Unresolved inclusion"[/QUOTE] Have a look at this [URL="http://www.nabble.com/Unresolved-inclusion:-warning--with-CDT-5.0-(Ganymede)-td18404356.html"]thread[/URL], should be the same problem your facing as well. The GCC should have been confused on where the include files are located. I would really guess it shouldn't. but its worth a try! ssharish | |
Re: YES, you need to allocate memory for msg before you copy the string on to msg. Failing to do that will lead to a Segmentation fault. ssharish | |
Re: >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 to delete it(really short on money). Well, you can display all … | |
| Re: You could also do something like this. Where you return the memory address of the allocate space in heap. [code] #include <stdio.h> int** allocate_matrix(int rows, int columns); int main() { int **table = NULL; table = (int **)allocate_matrix(3, 3); getchar(); return 0; } int** allocate_matrix(int rows, int columns) { int … |
Re: As everyone else had pointed out solution for, it better to you scanf function to read string or to reading anything at all. At least that my preference. But anyway, if you still used it make sure you flush the input stream before the second call of scanf function. The … | |
Re: Well I got to see how you call DeleteNode function. Is the node parameter to the DeleteNode function is a valid pointer to a strcut node? And in the Init function you create a new Person node and do you assign that it some other struct anywhere? And by the … | |
Re: [code] while((sizeof(struct player)) > 1) { for (j=0; j<k;j++) { /*count k-1 places around circle*/ current_player = current_player->next; } [/code] I dont really understand the logic here? Thats is gonna get into an infinite loop! You need to have a proper condition for while to exit. -ssharish | |
Re: And also this line is gonna print junk [code] printf( "\nInteger decomposition of %d is %d + %d + %d\n\n", n, a, b, c ) ; [/code] You might to return those i,j,k values back to main to print them accordingly. -ssharish | |
Re: This is quite messy; you might have start looking at some text on good programming practice. The few things which I could pick up from a quick glance are as follow 1. Main should return an int not void – MUST 2. Do not declare function within main. Would still … | |
Re: I would agree with AC, it is a crappy code, which dosnt follow any standard. If you still say that a valid code, then have a look at this [code] MyLL * first; MyLL * last; [/code] What is MyLL. Is it typedef ? No! ~ssharish | |
Re: '.' is the operatir which you are looking at. '->' is the operator which you need when you dereference the struct pointer variable. Like for an example [code] struct node { int data; } struct node *d; struct node d1; printf("%d\n", d->data); // you could also use (*d).data here. The … | |
Re: >regardless of whatever stores at a shouldn't it produce -2. I dont really see why do you expect those values. When you dereference a, you will get junk jusy because you haven't initialised it. When you didthis *(a+1), it was getting the address of a thats the base address and … | |
Re: I can write a big list of comments on your code. But i dont have time for that. But just a quick review you are using quite a lot of non standard function and libraries. What compiler are u using? But over all good code. ssharish | |
Re: Well, Turbo C is a very old compile which is no more support. Why dont u use some standard compile. I can understand that you on a windows environment. I would really sugguest to change compile which you trying to use to Dev-C++. It is pretty good and it good … | |
Re: [QUOTE=PRATS 1990;830719]I HAVE A VERY PECULIAR PROBLEM,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, THE PROGRAMS I COMPILE SHUT DOWN AFTER COMPILING ONCE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, FOR EG- I CREATED THIS PROGRAM FOR GETTING THE ASCII CODES OF AN ALPHABET ,,,,,,,,,,,,,,,,,, AFTER I WROTE THE ALPHABET IN DOS IT DISPLAYED ITS VALUE AND SHUTDOWN,,,,,,,,,,,,,,,, HOW CAN I ALTER MY PROGRAM … | |
Re: 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 range as you keep moving away. well, increasing the range of the bluetooth is possible and the Bluetooth … | |
Re: 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 should be read. And how the file had been formatted with … | |
Re: >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 errors. Assuming that your program compiled with no warning or errors, the .exe … | |
Re: >Please suggest the addValue definition to accommodate this change Looking at the way you call the function. The function definition should look like: [code=C] void addValue(struct Info **info, char *value, int posVal); [/code] So that's the function addValue which takes pointer-to-pointer of struct Info type, char pointer and an integer. … | |
Re: [QUOTE=vinitt88;828431]Hi, I am trying to develop a DOS-like system which will be able to do all minor functions like cd.. cd/ and changing to sub directories. Guys I am stuck in how to find a single path for many files..... Thanx in ADVANCE[/QUOTE] Well, if you are trying to executing … |