No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
6 Posted Topics
[QUOTE=ssharish2005;634285]champnim, I suspect the problem might be when you free the node which wanted to delete. Perhaps, the memory leak. Do you know the abc char ptr which you have in your node, that needds to be freed as well, before you free temp!!! ssharish[/QUOTE] In top of that, and …
I do think that your program really should look like: [CODE]int myfunction(int argc, char *argv[]) { int i; for(i=0;i<argc;i++) unlink(argv[i]); } int main(int argc, char **argv) { myfunction(argc,argv); }[/CODE] That means that the arguments to your program are passed directly to your function. The drawback with starting your loop with …
It seems that java -version sends its output to stderr, at least in my case. Just try this: [CODE]version=`java -version 2>&1` [/CODE] and see if it works better for you.
The first macro issue is a double problem within the scanf statement. The line should be replaced with: [code]scanf("%c",&a); [/code] For your second macro, the code is not compiling because of an extra parenthesis in the macro itself. It should look like: [CODE]#define NBIT(X,N) ((X&(1<<N))?1:0)[/CODE] On an other hand, the …
[QUOTE=wsn;574743]Thank you for your reply. I changed it &name[0] but it still returns the whole string? Isn't %2s for the first two characters?[/QUOTE] The %2s does not work because %s means a string regardless of the numbers of characters. You should use "%2c" instead to achieve what you're trying to …
It must be because of the: ofstream fout(newfileName,ios::app); inside your if statement. You in fact repoen a file that was not closed and it seems to screw up the output. Cheers, Pascal.
The End.