Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

halp C++

Name: Anonymous 2007-09-16 0:26 ID:rkBJBecZ

// EX4_3.CPP
//Initialise a string, and then use a loop function to change every letter to uppercase
#include<iostream>
using namespace std;
int main()
{
    const int MAX = 80;            // maxximum length of string
    char buffer [MAX];            // input buffer
    char* pbuffer = buffer;        // pointer to array buffer
    int i = 0;


        cout << endl
        << "Enter a string of lowercase letters less than " << MAX << "characters:"
        << endl;

    cin.getline(buffer, MAX, '\n');        //read string until \n

    while(*pbuffer)                        // continue until /0
            pbuffer++;

    for(i = 1; i <= *pbuffer; i++)
        buffer[i]-32 = buffer[i];

    cout << "CRUISE CONTROL = " << buffer << " LOLZ"
        << endl;
    return 0;
}


WHAT THE FUUUUUCK do i do to incriment every character in the array buffer to uppercase? its ASCII so i just subtract 32,
right?

Name: Anonymous 2007-09-16 14:19 ID:P8gKGFTF

>>13
There's no such thing as American English. The name is a contradiction in an on itself. I'm sorry to disappoint you American heroes, but there's only one English — the one speaken in England. You can go back to your History-less farmer country with your greasy hamburgers, your motor oil, your pollution, and your petty national pride, based on Route 66, NASCAR, baseball and the superbowl (your most precious cultural elements that you didn't steal from Europe), while you worship a pack of rebels from a couple of centuries you would call terrorists if they fought against you.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List