messy questions: how to convert a string into a int64 in linux

Thread Tools Search this Thread
Top Forums Programming messy questions: how to convert a string into a int64 in linux
# 1  
Old 12-18-2009
messy questions: how to convert a string into a int64 in linux

Recently I was stuck at 64bit questions in 32pc.......
lots of unknown questions came up ....

as mentioned :
messy questions: how to convert a string into a int64 in linux
i tried
ll = atoll(string)
but faild
ll is defined as :
long long ll = 0;
I print the return like this:
printf("%INT64d",ll); but failed
printing like this "printf("%INT64d",ll)" in windows succeeds, but in linux I get failure..
# 2  
Old 12-18-2009
Try strtoimax() if int64 is the same as intmax_t on your system.
# 3  
Old 12-18-2009
Are you looking to convert your string into an int64 or into a long long? An int64 type is not necessarily the same as a long long type. (They may be the same but it is not a requirement.)

What compiler and version are you using?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl:: Arrays w/ UInt64.max>index>Int64

Where is the delete or remove post option? (1 Reply)
Discussion started by: f77hack
1 Replies

2. UNIX for Advanced & Expert Users

Transpose Messy Data

I have a messy, pipe-delimited ("|") input dataset. I would like to create a file of ID plus each component of field 4 which is delimited by ";" into a long, skinny shape for easier processing. A couple of complications are that field 4 may contain both commas and linefeed characters from the... (9 Replies)
Discussion started by: 91674io
9 Replies

3. Shell Programming and Scripting

Search several string and convert into a single line for each search string using awk command AIX?.

I need to search the file using strings "Request Type" , " Request Method" , "Response Type" and by using result set find the xml tags and convert into a single line?. below are the scenarios. Cat test Nov 10, 2012 5:17:53 AM INFO: Request Type Line 1.... (5 Replies)
Discussion started by: laknar
5 Replies

4. Shell Programming and Scripting

Help with convert string

Hi. I will be very appreciated for help. I need replace all characters into string with \ (backslash) I mean if I have word abcdefg as input. How I can convert it to \a\b\c\d\e\f\g Thanks and best regards. Staas. (5 Replies)
Discussion started by: beckss
5 Replies

5. Programming

How to use we use int64?

Recently my project needs int64 variables. However my os and computer are both 32bits. So how can i use int64 as a parameter in a function. and is int64 a structure as user-defined structures..... ??? thanx i am waiting for ur answer:rolleyes: (2 Replies)
Discussion started by: macroideal
2 Replies

6. Shell Programming and Scripting

Getting multiple messy lines into one single line

I have a file that contains the following: :@:176:@:4:@:name:@:file:@:this is a summary:@:description can be long but who knows can even have <br> tags.:@:how to:@:type:@:18544:@:550:@:400:END: :@:177:@:9:@:name:@:file:@:summary:@:this will containg... (18 Replies)
Discussion started by: sysrenan
18 Replies

7. Shell Programming and Scripting

PCRE string questions.

What is the string that would satisfy this expression: "^gs{3}$" ? What is an expression that would satisfy all these strings: csafaq.exe, csafbc.exe, asdfcd.exe? Also, To catch these files, : gdnus1862.exe gdnus10.exe gdnus250.exe gdnus2337.exe I am using this regex. :... (2 Replies)
Discussion started by: komputersman
2 Replies

8. Programming

char to int64 conversion

Hi, I'm converting a C program that I made using the Visual Studio. I now use GCC (over Linux) and can't find some equivalences. I changed my __int64 definitions to unsigned long long, but can't find an equivalent to the microsoft i64toa() function, which let you convert a char* to a 64 bit... (1 Reply)
Discussion started by: Raspoutine
1 Replies

9. Linux

Linux questions

Hi everyone, I came from a diffrent UNIX background and am trying to learn Linux (Red Hat) in a hurry. I would be very grateful if you could help me with the following questions. I know the answers for questions 1, 3, and 4 in a Sun Solaris environment, but not in Linux... Thanks in advance for... (3 Replies)
Discussion started by: Enigma777
3 Replies

10. UNIX for Dummies Questions & Answers

Is there a place like this for LINUX questions?

Is there some place like this for linux questions? a forum like area to ask questions? I love this site, i've learned a lot (use unix - solaris, and linux - redhat). Unfortunately has gotten rid of their support forums, everything is in a list type format and I don't want to... (6 Replies)
Discussion started by: kymberm
6 Replies
Login or Register to Ask a Question

Featured Tech Videos