String pointers and string arrays

F

Flash Gordon

pete said:
Old Wolf wrote:
Note also that: char str[10] = NULL; is also illegal,
This is legal and initializes str to contain null characters.

It is not legal.
Initialization of aggregate types requires {braces}.

Also NULL could expand to an expression of pointer type, e.g.
((void*)0), in which case even with the braces it would fail unless you
also cast it to an integer type.
 
R

Rod Pemberton

Keith Thompson said:
My point is that I often see regulars, people who know about the FAQ,
posting lengthy (and usually correct) explanations that duplicate the
information that's already in the FAQ. (I've probably done this
myself.) The regulars aren't making as much use of the FAQ as we
could.

Tag. Your it. Post it once a month. Simple.


Rod Pemberton
 
M

Mark McIntyre

I agree in principle, but not in practice. The problem is that
most of the questioners never heard of the FAQ, and almost
certainly don't have it at their fingertips.

Its not that hard to say

"Its a FAQ - read my sig"

Mark McIntyre
 
C

CBFalconer

Mark said:
Its not that hard to say

"Its a FAQ - read my sig"

But they're not going to do it. Many of these newbies are using
google. Going off to read a reference is quite likely a major
expedition for them, and would involve losing track of where they
are in reading our (collective) golden verbiage, with no known way
(for them) of placing a marker and coming back. They are probably
using such evil things as Outhouse (maximized to cover the entire
screen) for access.

That's why I persist in having both instructions and references in
my 'Google' sig. even though it makes it exceed four lines.

--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943
 
K

Keith Thompson

CBFalconer said:
But they're not going to do it. Many of these newbies are using
google. Going off to read a reference is quite likely a major
expedition for them, and would involve losing track of where they
are in reading our (collective) golden verbiage, with no known way
(for them) of placing a marker and coming back. They are probably
using such evil things as Outhouse (maximized to cover the entire
screen) for access.

As far as I know, news.google.com can only be accessed through a web
browser (I don't think Google provides an NNTP server). Following a
link should be *easier* for Googlers than for the rest of us.
 
C

CBFalconer

Keith said:
As far as I know, news.google.com can only be accessed through a web
browser (I don't think Google provides an NNTP server). Following a
link should be *easier* for Googlers than for the rest of us.

Following, yes. Returning, no. IE doesn't have such handy things
as the Firefox tabs AFAIK (I haven't touched Exploder in years).
At any rate the first time a googlepuss follows something, and
can't easily return, he is taught not to follow things.

--
"The power of the Executive to cast a man into prison without
formulating any charge known to the law, and particularly to
deny him the judgement of his peers, is in the highest degree
odious and is the foundation of all totalitarian government
whether Nazi or Communist." -- W. Churchill, Nov 21, 1943
 
F

Flash Gordon

CBFalconer said:
Following, yes. Returning, no. IE doesn't have such handy things
as the Firefox tabs AFAIK (I haven't touched Exploder in years).
At any rate the first time a googlepuss follows something, and
can't easily return, he is taught not to follow things.

In IE you can always open a new window when clicking on a link, so if
someone complains about that tell them to right click and open it in a
new window. On IE7 as I have it configured clicking on a link in Google
opened the URL in a new tab. I could check IE6 but that requires running
up a virtual machine.
--
Flash Gordon
Living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidlines and intro -
http://clc-wiki.net/wiki/Intro_to_clc
 
D

Default User

CBFalconer said:
Keith Thompson wrote:

Following, yes. Returning, no. IE doesn't have such handy things
as the Firefox tabs AFAIK (I haven't touched Exploder in years).
At any rate the first time a googlepuss follows something, and
can't easily return, he is taught not to follow things.

IE does provide for opening a link in a new window. Also, the standard
navigation capability should bring the user back to the message window.


Brian
 
K

Keith Thompson

CBFalconer said:
Following, yes. Returning, no. IE doesn't have such handy things
as the Firefox tabs AFAIK (I haven't touched Exploder in years).
At any rate the first time a googlepuss follows something, and
can't easily return, he is taught not to follow things.

Huh??

I've never seen a web browser, IE included, that didn't have a "back"
button. Following a link and going back to where you came from is
*trivial*. It's also easy to open a link in a new window.

In any case, my original point was simply that we're not making very
good use of the FAQ. If you think following a link is too difficult,
you could always copy-and-paste the FAQ entry into your response
rather than composing an answer from scratch.

If someone asks

Why doesn't strcat(string, '!'); work?

the *only* necessary response is:

See the comp.lang.c FAQ, <http://www.c-faq.com/>, question 8.1.

And if half a dozen of us post the same thing (due to the asynchronous
nature of Usenet), maybe the idea that posters should check the FAQ
before posting would start to sink in.

If someone comes back and says, "Following that link is much too
difficult for me, please spoon-feed me the answer", we can then decide
what to do next.
 
C

CBFalconer

Keith said:
.... snip ...

I've never seen a web browser, IE included, that didn't have a "back"
button. Following a link and going back to where you came from is
*trivial*. It's also easy to open a link in a new window.

In any case, my original point was simply that we're not making very
good use of the FAQ. If you think following a link is too difficult,
you could always copy-and-paste the FAQ entry into your response
rather than composing an answer from scratch.

If someone asks

Why doesn't strcat(string, '!'); work?

the *only* necessary response is:

See the comp.lang.c FAQ, <http://www.c-faq.com/>, question 8.1.

And if half a dozen of us post the same thing (due to the asynchronous
nature of Usenet), maybe the idea that posters should check the FAQ
before posting would start to sink in.

If someone comes back and says, "Following that link is much too
difficult for me, please spoon-feed me the answer", we can then decide
what to do next.

As I said way back, I agree in principle. However a couple of
lines to answer a question is not much more effort than a faq ref,
and may be much less. I, for one, would take some time and effort
to find the appropriate faq ref. Lets face it, the supply of
newbies will always exceed the training of same. Some get all hot
under the collar when referred elsewhere, so the existence of a
variety of fairly accurate replies is no fault.

Ideally the question doesn't get asked in the first place, because
the faq has been consulted and is clear to the neophyte. But this
may not work, and reminds me of my own problems teaching newbies.
I tend to give a perfectly coherent and comprehensive explanation
of something that is second nature to me, and receive a blank
look. This results in repeating the aforesaid explanation with
slight variation in emphasis and volume, and the same blank look.
Now what can I do?

I have seen better teachers than I give less comprehensive (and
less accurate) explanations, and been instantly understood by those
same blank-faced newbies. This is a talent to be respected. I do
not have it.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 
R

rhinow

Vladimir, gostaria de tirar uma duvida sobre ponteiros!!
Como inverter os valores de um ponteiro assim como faço com simples
vetores de caracter?
 
R

RSoIsCaIrLiIoA

As I said way back, I agree in principle. However a couple of
lines to answer a question is not much more effort than a faq ref,

i agree; there are case where a couple of words is enough
and may be much less. I, for one, would take some time and effort
to find the appropriate faq ref. Lets face it, the supply of
newbies will always exceed the training of same. Some get all hot
under the collar when referred elsewhere, so the existence of a
variety of fairly accurate replies is no fault.

Ideally the question doesn't get asked in the first place, because
the faq has been consulted and is clear to the neophyte. But this
may not work, and reminds me of my own problems teaching newbies.
I tend to give a perfectly coherent and comprehensive explanation
of something that is second nature to me, and receive a blank
look. This results in repeating the aforesaid explanation with
slight variation in emphasis and volume, and the same blank look.
Now what can I do?

I have seen better teachers than I give less comprehensive (and
less accurate) explanations, and been instantly understood by those
same blank-faced newbies. This is a talent to be respected. I do
not have it.

i think your problem is only you take too much time for NGs
(as many others) your post are very helpful
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,175
Messages
2,570,942
Members
47,490
Latest member
Finplus

Latest Threads

Top