473,320 Members | 1,978 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

TypeCasting Array

snowfall
Hi all,

How to TypeCast a String Array to Integer Array??


TIA...
Jan 28 '08 #1
3 3561
r035198x
13,262 8TB
Hi all,

How to TypeCast a String Array to Integer Array??


TIA...
How would you cast a String to an Integer?
Jan 28 '08 #2
How would you cast a String to an Integer?
new Integer(Integer.parseInt(StringName))

In my program my string array has numbers..
ie) String a[]={"1","2","3"};
Jan 28 '08 #3
r035198x
13,262 8TB
new Integer(Integer.parseInt(StringName))

In my program my string array has numbers..
ie) String a[]={"1","2","3"};
You'll need to loop through the array doing that for each of the strings.
Jan 28 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: cman | last post by:
#include <stdio.h> class Base { public: Base() { printf("Base()\n"); } ~Base()
2
by: Arun Prasath | last post by:
Hi all, I have the following question regd pointer typecasting. Is the following type of pointer typecasting valid? #define ALLOC(type,num) ((type *)malloc(sizeof(type)*num)) /*begin...
11
by: Martin Johansen | last post by:
Say I have these variables: char *array; void *p; how can I typecast p to the type of array?
1
by: b83503104 | last post by:
When are they not consistent?
11
by: Vinod Patel | last post by:
I have a piece of code : - void *data; ...... /* data initialized */ ...... struct known_struct *var = (struct known_struct*) data; /*typecasting*/ How is this different from simple...
3
by: jdm | last post by:
In the sample code for the SortedList class, I see the use of a string typecasting macro consisting of a single letter "S". i.e.: Sortedlist->Add(S"Keyval one", S"Item one"); Now I have...
12
by: bwaichu | last post by:
What is the best way to handle this warning: warning: cast from pointer to integer of different size I am casting in and out of a function that requires a pointer type. I am casting an...
26
by: Nishu | last post by:
Hi All, Is it valid in C to typecast a pointer? eg. code snippet... considering int as 16 bit and long as 32 bit. int *variable, value; *((long*)variable)++ = value; *((long*)variable)++...
1
by: bhuvanvel | last post by:
Error Cannot implicitly convert type 'int' to 'Empolyee' how to do get userdefined number of array when web services starts it should be ask the user to no. of array to allocate how to...
1
by: ashlekha | last post by:
Hi, I am doing socket programming I am receiving my payload message in a structure. now to encapsulate it i have to convert it into a buffer. Buffer is nothing but a charcter pointer array....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.