165 Posted Topics
Re: You can always get integers using scanf functions. you can use getw() & putw() functions to get integers from a file opened in binary mode. Does this answer your question? And also putw ( n = getw(stdin), stdout ) will seem to work but wont for a good reson. Find … | |
Re: Search the forum first, many threads are there on bitwise operators | |
Re: sytem() fn doesnt work for me either. My computer always says "Not enough memory" when I use system() & spawn...() functions. but then, many dos commands can be implemented using c. eg, you can manipulate files & folders, etc with some functions. Format a drive, and other dos functions using … | |
Re: [QUOTE]void list::inslast(int x) { nn=new node; nn->data=x; p=first; while(p->ptr!=NULL) { p=p->ptr;}[/QUOTE] Write a code to handle p == NULL [QUOTE]void list::delelement(int x) { node *q; p=first; while(p->data==x) { q=p; p=p->ptr; } q->ptr=p->ptr; cout<<"\n\t\t Successfully deleted..\n"; }[/QUOTE] while ( p->data != x ) should be used. x is what you dont … | |
Re: There are many I would call [URL="http://www.daniweb.com/forums/thread113926.html"]this one[/URL] great | |
Re: It has nothing to do with your previous question. Why put it hear. Find its length, with a for loop. for ( i = 0 ; i < length/2 ; i++ ) { //swap ith char with length -1- ith char } | |
Re: Well, use any function that does the job. besides, rewind() is nothing but fseek (/* file pointer*/fp ,0L, SEEK_SET ) ; | |
Re: considering line 80 to 104, You alredy have the data in line & you know exactly what format the data is. So, why dont you use sscanf(). And for the malloc problem 1) You may follow what dragon said & loop twice over the file 2) use a linked list. … | |
Re: The second can be solved very easily with a for loop alone for ( i = 1 ; i < n / 2 ; i++ ) if ( !(n % i )) sum += i ; While the first, you may use the follwing: 1) Get the unsigned number 'n'( … | |
Re: I dont know HTML but I have read the basic few years back. And I have some questions. 1) Coments in HTML start with <!... right? So are you restricting the size of comments 2) Some HTML Tags dont have ending tag. I did'nt find any peice of code that … | |
I know nothing about ASP and I am intrested in learning it. Please help me find a good means to start. | |
Re: I agree with you there. Its always joyful to play with pointers & casting pointers. So larryeis, learn a bit more about casting & pointers. I promise, it would be fun | |
Re: it does choose some path. I doubt weather it will find all paths exhaustively. like left, right forward in random order | |
Re: [QUOTE=John A;597639]A couple of other notes: - [URL="http://users.aber.ac.uk/auj/voidmain.shtml"]void main is evil[/URL]. Don't use it. - You shouldn't have your function prototype inside main(). Move line 13 to somewhere before main()[/QUOTE] I nerver thought void main had so much drawbacks thanks a lot for you advice. |
The End.