![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to pick values from column based on key values by usin AWK | repinementer | Shell Programming and Scripting | 16 | 07-24-2009 09:59 AM |
| a tab between values | kylle345 | Shell Programming and Scripting | 3 | 07-23-2009 12:17 AM |
| Converting Binary decimal coded values to Ascii Values | gaur.deepti | UNIX for Advanced & Expert Users | 3 | 04-02-2008 01:33 PM |
| max values amd min values | devmiral | Shell Programming and Scripting | 12 | 04-19-2007 11:42 AM |
| xor 2 values in ksh? | DukeNuke2 | Shell Programming and Scripting | 5 | 11-08-2006 12:38 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
C++ ASCI int values
Hi All,
I'm currently fiddling about trying to learn C++ and wrote a little program that outputs the ASCI values for numbers 0-255 but it's got a problem... For the numbers 255 thru 128 it shows a negative number. For numbers 127-0 (my loop decrements) it shows the correct numerical value... Here's my loop: Code:
for (c=255; c>0; c--)
{
// output the value of c
printf ("%d : ",c);
// make variable chChar the value of c
chChar = c;
// output asci value of chChar
cout << chChar << " : " << (int)chChar << endl;
}
Many thanks ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|