digitalmars.D.learn - Error: cannot implicitly convert expression () of typechar[5] to char[][]
- jicman (24/24) Feb 23 2007 Greetings. I am receiving these errors,
- Bradley Smith (7/38) Feb 23 2007 Should be
- jicman (8/46) Feb 23 2007 SO-No-vah!
- Bill Baxter (5/50) Feb 23 2007 You can help by adding such an example to the 'comments' page attached
- Brad Roberts (6/15) Feb 23 2007 An entry in bugzilla will probably be noticed and acted by walter on qui...
- Kirk McDonald (8/39) Feb 23 2007 Try:
- Brian Byrne (5/36) Feb 23 2007 Associative arrays are declared by (value)[(key)]. Going by this, your
- renoX (3/3) Feb 24 2007 *Sigh* these kind of error wouldn't happen if we had string as a base
- Brian Byrne (4/8) Feb 24 2007 alias char[] String;
Greetings. I am receiving these errors, OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quote") of typechar[5] to char[][] OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quotes\\") of type char[7] to char OpenJobs.d(2394): Error: cannot implicitly convert expression ("Language") of type char[8] to char[][] OpenJobs.d(2394): Error: cannot implicitly convert expression ("Deliverables\\") of type char[13] to char OpenJobs.d(2395): Error: cannot implicitly convert expression ("Technical") of type char[9] to char[][] OpenJobs.d(2395): Error: cannot implicitly convert expression ("Analysis\\") of type char[9] to char OpenJobs.d(2396): Error: cannot implicitly convert expression ((_aaKeys)((Proj),8u)) of type char[][][] to char[][] which is caused by these lines, 2292 char[char[]] Proj; 2293 Proj["Quote"] = r"Quotes\"; 2294 Proj["Language"] = r"Deliverables\"; 2295 Proj["Technical"] = r"Analysis\"; 2296 char[][] pKeys = Proj.keys; I went to the array page, and "I think" I am doing the declation ok. Help. jic
Feb 23 2007
jicman wrote:Greetings. I am receiving these errors, OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quote") of typechar[5] to char[][] OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quotes\\") of type char[7] to char OpenJobs.d(2394): Error: cannot implicitly convert expression ("Language") of type char[8] to char[][] OpenJobs.d(2394): Error: cannot implicitly convert expression ("Deliverables\\") of type char[13] to char OpenJobs.d(2395): Error: cannot implicitly convert expression ("Technical") of type char[9] to char[][] OpenJobs.d(2395): Error: cannot implicitly convert expression ("Analysis\\") of type char[9] to char OpenJobs.d(2396): Error: cannot implicitly convert expression ((_aaKeys)((Proj),8u)) of type char[][][] to char[][] which is caused by these lines, 2292 char[char[]] Proj; 2293 Proj["Quote"] = r"Quotes\"; 2294 Proj["Language"] = r"Deliverables\"; 2295 Proj["Technical"] = r"Analysis\"; 2296 char[][] pKeys = Proj.keys; I went to the array page, and "I think" I am doing the declation ok. Help. jicShould be char[][char[]] Proj; Proj["Quote"] = r"Quotes\"; Proj["Language"] = r"Deliverables\"; Proj["Technical"] = r"Analysis\"; char[][] pKeys = Proj.keys;
Feb 23 2007
== Quote from Bradley Smith (digitalmars-com baysmith.com)'s articlejicman wrote:ok.Greetings. I am receiving these errors, OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quote") of typechar[5] to char[][] OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quotes\\") of type char[7] to char OpenJobs.d(2394): Error: cannot implicitly convert expression ("Language") of type char[8] to char[][] OpenJobs.d(2394): Error: cannot implicitly convert expression ("Deliverables\\") of type char[13] to char OpenJobs.d(2395): Error: cannot implicitly convert expression ("Technical") of type char[9] to char[][] OpenJobs.d(2395): Error: cannot implicitly convert expression ("Analysis\\") of type char[9] to char OpenJobs.d(2396): Error: cannot implicitly convert expression ((_aaKeys)((Proj),8u)) of type char[][][] to char[][] which is caused by these lines, 2292 char[char[]] Proj; 2293 Proj["Quote"] = r"Quotes\"; 2294 Proj["Language"] = r"Deliverables\"; 2295 Proj["Technical"] = r"Analysis\"; 2296 char[][] pKeys = Proj.keys; I went to the array page, and "I think" I am doing the declationSO-No-vah! Thanks. Perhaps Walter may want to put a small example on the Array page. :-) All there is there is the int[char[]]. I knew it was something simple, but yet, complex! Again, muchas gracias. joseHelp. jicShould be char[][char[]] Proj; Proj["Quote"] = r"Quotes\"; Proj["Language"] = r"Deliverables\"; Proj["Technical"] = r"Analysis\"; char[][] pKeys = Proj.keys;
Feb 23 2007
jicman wrote:== Quote from Bradley Smith (digitalmars-com baysmith.com)'s articleYou can help by adding such an example to the 'comments' page attached to that page -- if there isn't one there already. (Look for the button labeled "Comments" near the top of the page). --bbjicman wrote:ok.Greetings. I am receiving these errors, OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quote") of typechar[5] to char[][] OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quotes\\") of type char[7] to char OpenJobs.d(2394): Error: cannot implicitly convert expression ("Language") of type char[8] to char[][] OpenJobs.d(2394): Error: cannot implicitly convert expression ("Deliverables\\") of type char[13] to char OpenJobs.d(2395): Error: cannot implicitly convert expression ("Technical") of type char[9] to char[][] OpenJobs.d(2395): Error: cannot implicitly convert expression ("Analysis\\") of type char[9] to char OpenJobs.d(2396): Error: cannot implicitly convert expression ((_aaKeys)((Proj),8u)) of type char[][][] to char[][] which is caused by these lines, 2292 char[char[]] Proj; 2293 Proj["Quote"] = r"Quotes\"; 2294 Proj["Language"] = r"Deliverables\"; 2295 Proj["Technical"] = r"Analysis\"; 2296 char[][] pKeys = Proj.keys; I went to the array page, and "I think" I am doing the declationSO-No-vah! Thanks. Perhaps Walter may want to put a small example on the Array page. :-) All there is there is the int[char[]]. I knew it was something simple, but yet, complex!Help. jicShould be char[][char[]] Proj; Proj["Quote"] = r"Quotes\"; Proj["Language"] = r"Deliverables\"; Proj["Technical"] = r"Analysis\"; char[][] pKeys = Proj.keys;
Feb 23 2007
An entry in bugzilla will probably be noticed and acted by walter on quite a bit faster. An entry in the wiki will be visible to the rest of the world faster. So.. I'd suggest doing both if you have the drive, or bugzilla if you want the docs to ever be updated. Later, BradThanks. Perhaps Walter may want to put a small example on the Array page. :-) All there is there is the int[char[]]. I knew it was something simple, but yet, complex!You can help by adding such an example to the 'comments' page attached to that page -- if there isn't one there already. (Look for the button labeled "Comments" near the top of the page). --bb
Feb 23 2007
jicman wrote:Greetings. I am receiving these errors, OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quote") of typechar[5] to char[][] OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quotes\\") of type char[7] to char OpenJobs.d(2394): Error: cannot implicitly convert expression ("Language") of type char[8] to char[][] OpenJobs.d(2394): Error: cannot implicitly convert expression ("Deliverables\\") of type char[13] to char OpenJobs.d(2395): Error: cannot implicitly convert expression ("Technical") of type char[9] to char[][] OpenJobs.d(2395): Error: cannot implicitly convert expression ("Analysis\\") of type char[9] to char OpenJobs.d(2396): Error: cannot implicitly convert expression ((_aaKeys)((Proj),8u)) of type char[][][] to char[][] which is caused by these lines, 2292 char[char[]] Proj; 2293 Proj["Quote"] = r"Quotes\"; 2294 Proj["Language"] = r"Deliverables\"; 2295 Proj["Technical"] = r"Analysis\"; 2296 char[][] pKeys = Proj.keys; I went to the array page, and "I think" I am doing the declation ok. Help. jicTry: char[][char[]] Proj; -- Kirk McDonald http://kirkmcdonald.blogspot.com Pyd: Connecting D and Python http://pyd.dsource.org
Feb 23 2007
jicman wrote:Greetings. I am receiving these errors, OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quote") of typechar[5] to char[][] OpenJobs.d(2393): Error: cannot implicitly convert expression ("Quotes\\") of type char[7] to char OpenJobs.d(2394): Error: cannot implicitly convert expression ("Language") of type char[8] to char[][] OpenJobs.d(2394): Error: cannot implicitly convert expression ("Deliverables\\") of type char[13] to char OpenJobs.d(2395): Error: cannot implicitly convert expression ("Technical") of type char[9] to char[][] OpenJobs.d(2395): Error: cannot implicitly convert expression ("Analysis\\") of type char[9] to char OpenJobs.d(2396): Error: cannot implicitly convert expression ((_aaKeys)((Proj),8u)) of type char[][][] to char[][] which is caused by these lines, 2292 char[char[]] Proj; 2293 Proj["Quote"] = r"Quotes\"; 2294 Proj["Language"] = r"Deliverables\"; 2295 Proj["Technical"] = r"Analysis\"; 2296 char[][] pKeys = Proj.keys; I went to the array page, and "I think" I am doing the declation ok. Help. jicAssociative arrays are declared by (value)[(key)]. Going by this, your declaration puts value == char and key == char[]. What you want is value == char[], so try type: char[][char[]]. Brian Byrne
Feb 23 2007
*Sigh* these kind of error wouldn't happen if we had string as a base type: string[string] and it looks much better. renoX
Feb 24 2007
renoX wrote:*Sigh* these kind of error wouldn't happen if we had string as a base type: string[string] and it looks much better. renoXalias char[] String; I started doing it a while ago for all my projects :). Brian Byrne
Feb 24 2007