12-17-2012
Quote:
Originally Posted by
achenle
You sure didn't seem to know it, else you never would have posted this:
Quote:
Oiginally posted by garysk. In a loop that uses tags_sn == NULL as its terminating condition, it fails to terminate and instead of course gets a segmentation violation and dumps core.
At the time that I posted it, I did know that assigning to an array was bad, but I didn't think/know/relying-on-memory that I was doing so. In subsequent investigation (while waiting for helpful replies) I discovered to my surprise that tags_sn was not a pointer but an array. Should I have looked up the declaration before posting? Yes.
Was the post "necessary"? To me it was because I didn't see my error at that time, and wondered then if I was violating some constraint somewhere. Before the first replies came, I had found my error, but I was still concerned that the compiler had said nothing, and wondering what it HAD done with the code. The subsequent exchanges addressed these two questions.
I find that the first post (such as the original post here) I submit to any forum I join (which is NOT many) is usually brain-damaged in some way, but the others on the forum are usually graciously helpful nonetheless.
10 More Discussions You Might Find Interesting
1. Programming
Hi
We are using a code generator for initializing structures with the #define macro. Compiling it with the GCC 2.8.1 (with -ansi) it OK. But when we are using the SUN C 5.0 compiler it screams.
Following is a code sample:
#include <stdlib.h>
#include <stdio.h>
typedef struct TEST3 {... (4 Replies)
Discussion started by: amatsaka
4 Replies
2. UNIX for Dummies Questions & Answers
As you know, when a user logs in, the shell reads the initialization files in an order something like below...
###################
Bourne Shell
/etc/profile > $HOME/.profile
Bash Shell
/etc/profile > $HOME/.bash_profile > $HOME/.bash_login > $HOME/.profile > $HOME/.bashrc
C Shell... (3 Replies)
Discussion started by: SeanWuzHere
3 Replies
3. Programming
Hi All,
char a="\0";
a) a contains \0
a contains garbage value
b) a contains \
a contains 0
a contains garbage value
Pls, let me know correct result is a or b. I guess a.
Thanks,
Naga:cool: (2 Replies)
Discussion started by: Nagapandi
2 Replies
4. IP Networking
hello, i need help on setting my coyote linux, i've working on this for last 5 days, can't get it to work. I've been posting this message to coyote forum, and other linux forum, but haven't get any answer yet. Hope someone here can help me...... please see my attached picture first.
... (0 Replies)
Discussion started by: dlwoaud
0 Replies
5. Shell Programming and Scripting
Whenever i execute the below scriptlet with out proper file name it deletes /tmp directory .
I guess this is because value of variable a didnt get initialized and there for rm -rf /tmp/ get executed and entire /tmp directory get deleted.
How would i avoid any empty variables to be used in... (9 Replies)
Discussion started by: pinga123
9 Replies
6. Programming
Hello everyone,
I have a question, that are the following ways of pointer intialization same ?
ClassA *point;
point = 0;
point = new ClassA;
Thanks a load in advance!!
Regards, (10 Replies)
Discussion started by: mind@work
10 Replies
7. Programming
I'm writing a program which uses curl to be run on Linux PCs which will be used by a number of different users. I cannot make the users all install curl on their individual machines, so I have tried to link curl in statically, rather than using libcurl.so. I downloaded the source and created a... (8 Replies)
Discussion started by: BrandonShw
8 Replies
8. Shell Programming and Scripting
new to shell scripting.
below line is showing error in script.
${parameter:=word}
in the o/p first it shows the below error.
word: not found.
and then in next line print "word"
----------------
p2: word: not found.
word
---------------------------
OS is AIX and shell is... (12 Replies)
Discussion started by: scriptor
12 Replies
9. Shell Programming and Scripting
Hallo Team,
I have a simple request and i would appreciate your help.
I would like to use two dates in my script lets:
A=$(date +"%d %B %Y")
echo $A
23 June 2014
That's awesome now we cooking. Now i want B to be on the previous month
eg: echo $B Should give me
23 May 2014
I would... (9 Replies)
Discussion started by: kekanap
9 Replies
10. Shell Programming and Scripting
Hi ,
I was invoking a sh file using the nohup command. But while invoking, I received a below error.
Error occurred during initialization of VM
Unable to load native library: /u01/libjava.so: cannot open shared object file: No such file or directory
.
Could you please help out.
Regards,... (2 Replies)
Discussion started by: Kamal1108
2 Replies