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

Pages: 1-

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 1:29 ID:Heaven

Use the right tool for the job.

perl -pe '$_=uc'
or even
tr a-z A-Z

Name: Anonymous 2007-09-16 3:23 ID:Heaven


while(*pbuffer) if(isalpha(*pbuffer)) *pbuffer++ &= ~(1u << 5);

:)

Name: Anonymous 2007-09-16 6:19 ID:6CYL7maR

toupper

idiots

Name: Anonymous 2007-09-16 6:33 ID:G/kQRa8m

Exhibit >>1: C++ EXPERT PROGRAMMER.

Name: Anonymous 2007-09-16 7:06 ID:cakRmirP

std::string, std::toupper ad std::transform do you know them ?

Name: Anonymous 2007-09-16 8:51 ID:8UMjR9by

int main
{
 void * x = *(main);
 (*x)++;
}

Name: Anonymous 2007-09-16 9:35 ID:UKkWEgK4

>>6
std

Name: Anonymous 2007-09-16 9:52 ID:Heaven

>>7
learn C you fucking piece of shit

Name: Anonymous 2007-09-16 12:40 ID:GPv8owb2

>>7
Wait... What?

Name: Anonymous 2007-09-16 13:32 ID:Heaven

javascript:void(document.body.style.textTransform='uppercase')

Name: Anonymous 2007-09-16 13:43 ID:Heaven

Name: Anonymous 2007-09-16 14:11 ID:9hzGlrPt

>>1
//Initialise a string

Programming is done in AMERICAN English, thank you.

Name: Anonymous 2007-09-16 14:14 ID:PNOBS+5u

#include <algorithm>
#include <cctype>
#include <string>

// ...
std::transform( str.begin(), str.end(), str.begin(), std::toupper );

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.

Name: Anonymous 2007-09-16 15:07 ID:2qWpDVQC

>>15
Lol Britfag. Don't like being a relic of an age when your country mattered?

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?

Name: Anonymous 2007-09-16 15:30 ID:9hzGlrPt

>>17
invented c

Name: Anonymous 2007-09-16 15:36 ID:7z1pKzSw

>>15
you faggots lost all rights to the name "english" in 1066.

Name: Anonymous 2007-09-16 15:41 ID:Heaven

YOU MISERABLE PIECES OF SHIT. YOU ARE NOT THE COUNTRY YOU WERE BORN IN. IF YOU NEED A ``NATION'' TO IDENTIFY WITH, THAT'S ONLY BECAUSE YOU ARE WORTHLESS FAILURES IN LIFE AND WILL NEVER ACCOMPLISH ANYTHING BY YOUR OWN MEANS.

Name: Anonymous 2007-09-16 15:46 ID:03juUDGy

>>15
American English is closer to 18th century grammar and pronunciation than any UK dialect. Therefore it is superior

Ask me about the subjunctive mood

Fag

Name: Anonymous 2007-09-16 16:40 ID:03juUDGy

// COCK-GOBBLE.CPP
#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

  for (i=0; i<(int)rand(); i++) {
    cout << i << endl;
    buffer[i] = (char) rand();
  }
}

Name: this may help you 2007-09-16 16:48 ID:XXTI3v97

choice = 0;
while(cpinmywinrar == 0)
{
  printf("GaiaFaggot gimme my fucking CP")
  switch(choice)
  {
    case 0: printf(" you weeboluvin whore mongler\n"); choice++;
    case 1: printf(" fyad asshat - this aint GBS\n"); choice++;
    case 2: printf(" ,wolrd of warcraft luv fest is thataway\n"); choice++;
    case 3: printf(" wigga in a half shell - nigra powA\n"); choice++;
    case 4: printf(" poon flap no.9\n"); choice++;
  }
  if(choice == 4)
{choice = 0;}

}

printf("lulz for great justice");

Name: Anonymous 2009-03-06 10:37

Programmers Mel finally gave   in and wrote   that joke I   cannot remember it   was about a   kid that had   BASIC BYTES FREE.

Name: Anonymous 2009-03-06 10:47

13 Yeah this kind   in C however   1 YOU will   NEVER COMPREHEND I   wrote an ANSI   C compiler when   I was 12   You should just   accept everything I   believe in and   AIDS THIS THREAD   is full of   shit like Win32.

Name: Anonymous 2013-01-19 23:38

/prog/ will be spammed continuously until further notice. we apologize for any inconvenience this may cause.

Name: Anonymous 2013-09-01 14:22


Shut the hell up, OP.

Name: Anonymous 2013-09-01 15:53


細かい作業は出来ないけど、岩をよじ登ってみたり出来るみたいよw
証拠も出さないし、誰も信用していないけどw

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