-
November 12th, 2009 02:34 AM
#1
C++ quick question
Hey guys just wondering is there a way to find the length of a int var in c++ like string.length() for strings?
-
November 12th, 2009 03:31 AM
#2
Greetz Riot. 
haven't properly checked but hopefully i've dug up a fairly useful url for you to take a gander at. 
http://oopweb.com/CPP/Documents/Thin...ume/chap07.htm
-
November 12th, 2009 05:45 AM
#3
definitely a good link but not exactly what i was looking for what i mean was if i have something like:
int numbers;
cout << " Enter some number: ";
cin >> number;
I want to find out how many characters are being held in the var numbers.
-
December 24th, 2009 04:56 AM
#4
Junior Member
This thread is a month old. But better late than never.
Ok. I found this site interesting. It might help with your question. Here is the link:
http://linuxshellaccount.blogspot.co...acters-in.html
Good luck.
Salmos 23:4 Aunque ande en el valle de sombra profunda, no temo nada malo, porque tu estas conmigo; tu vara y cayado son las cosas que me consuelan.
-
December 26th, 2009 04:54 AM
#5
 Originally Posted by Riot
Hey guys just wondering is there a way to find the length of a int var in c++ like string.length() for strings?
Pay me!
gcount Get number of characters extracted by last unformatted input operation (public member function)
You should study up on c and C++. Hope you were not talking about sizeof(int). Well here's a link that may help solve your vague question.
http://www.cplusplus.com/reference/iostream/iostream/
BTW, possible buffer overflow! Think about it.
Last edited by Linen0ise; December 26th, 2009 at 05:10 AM.
Similar Threads
-
By TheRepublican in forum General Programming Questions
Replies: 4
Last Post: April 23rd, 2005, 05:57 PM
-
By NetSec in forum *nix Security Discussions
Replies: 2
Last Post: September 25th, 2002, 01:02 AM
-
By roswell1329 in forum *nix Security Discussions
Replies: 2
Last Post: September 13th, 2002, 10:18 PM
-
By Obliterate in forum Newbie Security Questions
Replies: 16
Last Post: August 26th, 2002, 10:44 AM
-
By lewzer in forum Newbie Security Questions
Replies: 3
Last Post: August 7th, 2002, 03:07 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks