I have said program:

#include <iostream>
#include <fstream.h>
#include <conio.h>

using std::cout;
using std::cin;
using std::ios;
using std::endl;

int main()
    char first[6];
    char middle[16];
    char last[16];
    int counter = 0;
    char temp;

    cout << "Please enter your first, middle, and last name:\n>";

    cin.get(first, 6);
    cin.ignore(80, ' ');


    cout << first << "333\n";
    return 0;


I originaly had it inputting in everything using a much more complicated method, but then found that this one would be easier. at the moment, it is currently reading in data from the user constantly. it should ony read in 6 (I'll be changing that later... this program is in the debugging stage right now :P ) characters at a time, and capitalizing the first letter of each word. I'm gting to the middle/last name later.

I know this program looks simple, and thats because it's a homework assignment. so don't write this prgram for me, tell e what I shuld do to write it.

What it needs to be able to do at this stage is to read in data from the user and capitalize the first letter of the word. that's it...

I talked with Narue briefly on IRC, and she said:

[20:11:25pm] <@Narue> Wait, you're reading from cin though. I bet the stream is in an error state.

that bit has me confused... I don't know what she means by that.. So narue, if you can help me there, that would be great. :)

Derek Elensar

P.S. Please excuse my speling mistakes... this keyboard sucks :P

Edited by Derek Elensar: Narue is not a dude....

5 Years
Discussion Span
Last Post by Derek Elensar

Type a string, then hit enter, then type a space and hit enter again. That'll get you through the maze of ignores. ;) What exactly are you trying to accomplish here?


First, I don't think Narue is a dude. Second, I had this same post about 2 days ago, you may want to check out that thread. here

Edited by Saith: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.