473,320 Members | 1,916 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.

Type cast conversion

how to intialize blank space to int variable using type cast
even i use every thing but type cast is not working
Jul 30 '07 #1
2 1395
momotaro
357 100+
try to use this function:
Expand|Select|Wrap|Line Numbers
  1. int atoi(const char *s); // include stdlib
  2.  
this function convert a string pointed to by s to int

or more simple use the ascii code

hope it'll help
Jul 30 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
how to intialize blank space to int variable using type cast
even i use every thing but type cast is not working
Can you show me the code that doesn't work?
Jul 30 '07 #3

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

Similar topics

2
by: seia0106 | last post by:
Hello I am writing a function to read a binary file. Here is a part of code #include <fstream> .. .. BYTE *pData; long lDataLen; pms->GetPointer(&pData); lDataLen = pms->GetSize(); // Read...
15
by: buda | last post by:
Let me see if I got this :) 1. I know the rules for type conversions in arithmetic expressions 2. I know that an implicit type conversion is done at assignment, so float x = 1.23; int t = (int)...
14
by: tweak | last post by:
I'm struggling with the concept of typecasting when setting up a TCP client. Here's a code snip (modified from W. Richard Stevens Unix Programming book) to demonstrate where I am struggling: ...
9
by: Roman Mashak | last post by:
Hello, All! Given the sample piece of code I have: #include <stdio.h> #include <string.h> int main(void) { short int i, j;
4
by: T!LT3D | last post by:
Hi I'm trying to convert data automatically from a SqlDataReader into the correct type for its class property, it goes something like this but is reported syntactilly incorrect.... MyField =...
16
by: Enekajmer | last post by:
Hi, 1 int main() 2 { 3 float a = 17.5; 4 printf("%d\n", a); 5 printf("%d\n", *(int *)&a); 6 return 0; 7 }
2
by: Martin v. Löwis | last post by:
I've been working on PEP 353 for some time now. Please comment, in particular if you are using 64-bit systems. Regards, Martin PEP: 353 Title: Using ssize_t as the index type Version:...
4
by: KraftDiner | last post by:
I have the following code... import array len32 = array.array('L') len16 = array.array('H') len32.append(0) len16.append(0) y = len32
8
by: Smithers | last post by:
Are there any important differences between the following two ways to convert to a type?... where 'important differences' means something more profound than a simple syntax preference of the...
11
by: 1230987za | last post by:
Hi, I am totally confused now about C type conversion. I know that C does some implicit type conversion like integer promotion and float to double. I imagine that such conversion must keep the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
1
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: 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...

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.