Notices
The Basement Non-Honda/Acura discussion. Content should be tasteful and "primetime" safe.

programming guys

Thread Tools
 
Old Mar 17, 2005 | 06:43 PM
  #1  
sherwood's Avatar
sherwood
Thread Starter
I missed Sean
 
Joined: Aug 2004
Posts: 11,285
Likes: 1
From: Fairfield/Bridgeport CT
Default programming guys

C++
(win32 console app)

if i had a person input a character, could i have the computer give me a value for the corresponding ASCII number ?

like if they enter "a" can i get the value 97 as an integer?
Reply
Old Mar 17, 2005 | 06:46 PM
  #2  
Im@ge's Avatar
Im@ge
So ugly it hurts..See?
 
Joined: Feb 2004
Posts: 3,912
Likes: 0
Default

I purchased a Twix for 75 cents..so maybe? :thinking:
Reply
Old Mar 17, 2005 | 06:48 PM
  #3  
Misa's Avatar
Misa
Pic Whore
 
Joined: Jul 2004
Posts: 22,224
Likes: 1
From: NJ
Default

quick google search...
you might be able to work with it

Code:
// Transform a word into ASCII code

#include <iostream>
using namespace std;
int main()
{
    char word[32];
    int x = 0;
    cout << "Please enter the word (maximum 32 characters):\n";
    cin >> word;
    cout << "The ASCII for this word is:\n";
    while (word[x] != '\0')    // While the string isn't at the end...
    {
        cout << int(word[x]);    // Transform the char to int
        x++;
    }
    cout << "\n";
    return 0;
}
Reply
Old Mar 17, 2005 | 06:50 PM
  #4  
sherwood's Avatar
sherwood
Thread Starter
I missed Sean
 
Joined: Aug 2004
Posts: 11,285
Likes: 1
From: Fairfield/Bridgeport CT
Default

Originally Posted by janiVI
quick google search...
you might be able to work with it

Code:
// Transform a word into ASCII code
 
#include <iostream>
using namespace std;
int main()
{
char word[32];
int x = 0;
cout << "Please enter the word (maximum 32 characters):\n";
cin >> word;
cout << "The ASCII for this word is:\n";
while (word[x] != '\0') // While the string isn't at the end...
{
cout << int(word[x]); // Transform the char to int
x++;
}
cout << "\n";
return 0;
}
ho-fawk... so i just conver it to an int and it does it for me?
Reply
Old Mar 17, 2005 | 06:51 PM
  #5  
Misa's Avatar
Misa
Pic Whore
 
Joined: Jul 2004
Posts: 22,224
Likes: 1
From: NJ
Default

Originally Posted by DRfrank
ho-fawk... so i just conver it to an int and it does it for me?
i dont have vis studio on this comp....

just try it :dunno:
Reply
Old Mar 17, 2005 | 06:51 PM
  #6  
clickwir's Avatar
clickwir
Floppy Death! noES!!!
 
Joined: Oct 2002
Posts: 21,218
Likes: 0
From: Scranton, PA
Default

Originally Posted by DRfrank
ho-fawk... so i just conver it to an int and it does it for me?
C++ is considered a fairly high level programming language.
Reply
Old Mar 17, 2005 | 06:52 PM
  #7  
Im@ge's Avatar
Im@ge
So ugly it hurts..See?
 
Joined: Feb 2004
Posts: 3,912
Likes: 0
Default

listen to jani..He "uses teh cac" :chuckles:
Reply
Old Mar 17, 2005 | 06:54 PM
  #8  
Grifter's Avatar
Grifter
Senior Member
 
Joined: Dec 2000
Posts: 44,835
Likes: 0
From: the southwest
Default

http://www.bloodshed.net/devcpp.html
Reply
Old Mar 17, 2005 | 06:59 PM
  #9  
IluvJae's Avatar
IluvJae
Grifball Player
 
Joined: Aug 2004
Posts: 27,249
Likes: 0
From: Foundry
Default

I took C++ and its fairly easy.....i made a calculator with it :happysad:
Reply
Old Mar 17, 2005 | 07:01 PM
  #10  
Im@ge's Avatar
Im@ge
So ugly it hurts..See?
 
Joined: Feb 2004
Posts: 3,912
Likes: 0
Default

Jae and I be them computer literate Gangstas from the Ghetto...prolly the only ones of our own family that understands how computers work...but dont get it twisted..we'll cut yah.:squint:
Reply



All times are GMT -8. The time now is 04:24 AM.