| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Casting a string to an int
Code:
void Encode::convertMessage()
{
numericalMessageBuffer.resize(lengthOfMessage);
if(convertedToASCII==false)
{
for(int i=0;i<lengthOfMessage;i++)/*cast the values of each individual character in the orignial message to the ascii
int values and copy them into a buffer.*/
{
numericalMessageBuffer[i]=(int)message[i];
}
Ok, I need this program to cast the characters in a string to ascii int equivalants but it will not work. I see in debug mode it just copies the characters into the other string. Ideas? |
|
#2
|
|||
|
|||
|
Quote:
nevermind I solved my own problem yet again ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > Casting a string to an int |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|