From: Keith Thompson on 28 Apr 2010 22:23 John Gordon <gordon(a)panix.com> writes: > In <4bd602ef$0$12421$bbae4d71(a)news.suddenlink.net> "Bill Cunningham" <nospam(a)nspam.invalid> writes: > >> const char *msg("hello world\n"); > > That's not how to declare a string constant. Try this instead: > > const char *msg = "hello world\n"; Both declarations are valid in C++; only the second is valid in C. (And he needs #include <stdlib.h> for exit().) -- Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst> Nokia "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"
First
|
Prev
|
Pages: 1 2 Prev: how does a pts for child process get set? Next: Recursion crash in STL on linux |