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 15:28 ID:GPv8owb2

Baseball is an English invention, so is "American" football.
Basketball and netball are Canadian inventions.

Lol, what has the Amerikkkans ever done for the rest of us?

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