On Sep 16, 3:50 pm, "Francesco S. Carta" <entul...@gmail.com> wrote:
IPhone Lover <iphone.objc...@gmail.com>, on 16/09/2010 01:17:36, wrote:
On Sep 15, 10:47 pm, "Alf P. Steinbach /Usenet"<alf.p.steinbach
+use...@gmail.com> wrote:
* IPhone Lover, on 15.09.2010 19:35:
I have two array
keyArr = [@"name",@"city",@"street"]
valueArr = [@"Bob",@"Newyork",@"dallas"]
addDict = {@"name":@"Bob",@"city":@"Newyork",@"street":@"dallas"}
What programming language is this?
It looks a little like Python, but the at signs are not Python.
I suggest posting in a group dedicated to your programming language.
Cheers& hth.,
- Alf
--
blog at<url:http://alfps.wordpress.com>
Sorry to all of you messed up, but language does not bound the logic.
I just mention '[]' instead of '()' to declare array.
I have solved the problem by using switch case
int cnt;
for(NSString* s in valueArr){
switch(cnt++):
case 0:
[dict setObject:s forKey:[keyArr objectAtIndex:0]
as on
Uh... is that an incomplete post or what?
In any case, yes, the language does not bound the logic, but it can be
tricky to understand what exactly you're aiming to if we happen to
ignore the details of the language you're using... maybe you can express
it more clearly in pseudo-code or in plain English.
Here is an example about using std::map to create something along the
lines of your request, this is just one of the possible approaches and
even within the scope of this approach, the steps can be achieved in a
number of different manners.
Get a good C++ manual and don't forget to refer to the C++ FAQ available =
Waa.o great explanation. first of all i appreciate for the link which
you refer me. that's really helpful.