![]() |
| | #1 |
| Registered User Join Date: Aug 2009
Posts: 30
| 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 | |
| | #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 | |
![]() |
| Tags |
| code |
| Thread Tools | |
| Display Modes | |
|
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 |