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

Pages: 1-

HAY GUYS

Name: harlp 2008-02-26 4:04

anyone willing to help with c++ code?

i need to extract multiple characters from a string (specifically the last three from a 4 character string), and then make those into a string. is there a way to do this? or do i have to extract each of them seperately using string[1], string [2], string [3]?

and if so, how do i convert them into a string? :O?

HARLP.

Name: Anonymous 2008-02-26 4:21

DON'T HELP HIM

Name: Anonymous 2008-02-26 4:23

s[-3:]

Name: harlp 2008-02-26 4:23

>>2


why not? D:?

Name: Anonymous 2008-02-26 4:30

>>3

Name: Anonymous 2008-02-26 4:31

>>3
if this is correct syntax, i have no idea how to implement it. it keeps giving me the error: "Error: Unexpected ":" found."

Name: harlp 2008-02-26 4:39

here is the function which is its in. its not done yet. i need to fix this problem before i continue on:


void purchases(MealAccount MAArray[20])
{
    ifstream inFile;
    char     purchaseType;
    string     student, studentID;
   
    inFile.open("purchases.dat");
   
    getline(inFile, student);
   
    while (inFile)
    {
        purchaseType = student[0];
        studentID = student[-3:];

        cout << studentID;
        break;
    }
}

this code so far is giving me the error "Error: Unexpected ":" found." 

harlp me guys.

Name: Anonymous 2008-02-26 4:42

lol

Name: harlp 2008-02-26 4:46

lol guys, i'm retarded. :D

i went and sucked cock, and it gave me my answer.

Name: Anonymous 2008-02-26 5:12

is there a substring function?

Name: Anonymous 2008-02-26 5:12

or left() or right()

Name: Anonymous 2008-02-26 5:17

please be a troll

Name: Anonymous 2008-02-26 7:23

>>1
Please, stop posting.

Name: Anonymous 2008-02-26 9:25

I'm lolling at ``harlp''

Name: Anonymous 2008-02-26 9:25

I'm lolling at ``harlp''

Name: Anonymous 2008-02-26 9:34

String newString = oldString.substring(1);

Name: Anonymous 2009-03-06 9:01

The second button I   use a lot   of C homework?

Name: Anonymous 2009-08-16 23:24

Lain.

Name: Anonymous 2010-12-17 1:28

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

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