C Board  

Go Back   C Board > General Programming Boards > C++ Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 08-24-2009, 02:19 AM   #1
Registered User
 
Join Date: Aug 2009
Posts: 30
Question iota confusion

hey there

i am currently doing some assignment on prime palindromes and getting stuck on the int to string conversion.i have been trying to google it and seems getting no where esp with iota func.

here's the problem.


Code:
//the given function
unsigned intFindPalindromes(unsigned int array[],int start,int end)

//using iota
iota (int n,char* number,10)

// n is to be prime number
//here is where i got confused.

//if i do it this way ,does it mean int array[] is not the same as number[] in iota??
// let say if n=11,how does the compiler convert int into string. 
will it be number= [11] or number= ['1','1']???

thanks in advance
effa is offline   Reply With Quote
Old 08-24-2009, 09:23 AM   #2
Registered User
 
Join Date: Dec 2006
Posts: 1,780
I am guessing you meant itoa.

Integer TO Ascii

Even then, this is not a standard function. Use sprintf instead. Or even better, stringstream, since you are using C++.
cyberfish is offline   Reply With Quote
Reply

Tags
code

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Terrible confusion with time variables LowlyIntern C++ Programming 12 08-01-2008 07:23 AM
for loop confusion Enges C++ Programming 6 04-26-2006 08:21 AM
Server-net newbie confusion geek@02 Windows Programming 1 04-28-2005 02:08 AM
confusion with increment and decrement operators cBegginer C Programming 6 03-19-2005 03:45 PM
Unicode - a lot of confusion... Jumper Windows Programming 11 07-05-2004 07:59 AM


All times are GMT -6. The time now is 08:40 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22