initializing table of strings
From: Rafi Kfir (rafi.kfir_at_telrad.co.il)
Date: 04/29/04
- Next message: Frank Steinmetzger: "Newbie; Embedded VC (for PocketPC). Need help"
- Previous message: Robert W Hand: "Re: [C++] Vectors & Dynamic allocation"
- Next in thread: Francis Glassborow: "Re: initializing table of strings"
- Reply: Francis Glassborow: "Re: initializing table of strings"
- Reply: Gary Labowitz: "Re: initializing table of strings"
- Reply: Ulrich Eckhardt: "Re: initializing table of strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Apr 2004 04:44:06 -0700
I'n confused...
This will work:
char *p;
p = "Hello Wrold";
But this does not word";
char **p;
*p = "Hello World";
1) Can somebody explain this to me.
2) What solution can you offer me if my task is filling a table strings
(3 lines with 3 strings in each line). This has to be done NOT in the
decleration but in the program body. (reason is because I need to fill
the same table with different data few times).
The table is:
str11, str12, str13,
str21, str22, str33,
str31, str32, str33
The strings varies in length.
I began by delcaring char **Table, but then, any attempt to initialize the
tables (*Table = "ABC") gave me errors.
Thank you very much
- Next message: Frank Steinmetzger: "Newbie; Embedded VC (for PocketPC). Need help"
- Previous message: Robert W Hand: "Re: [C++] Vectors & Dynamic allocation"
- Next in thread: Francis Glassborow: "Re: initializing table of strings"
- Reply: Francis Glassborow: "Re: initializing table of strings"
- Reply: Gary Labowitz: "Re: initializing table of strings"
- Reply: Ulrich Eckhardt: "Re: initializing table of strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|