Re: [Dev-C++] Insight Debugger questions
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Verne H. B. <ve...@sy...> - 2005-03-22 19:39:25
|
Wonderbar! That's the info I was looking for and here's a good example for
any others that may be reading these mails. It's one of Ivor's and a good
one. For me! Down to reading more about the way it really is to be done
and to try to remember it. You young guys are lucky to be able to take it
in so much faster.
Verne
******************************
const int MAX = 80; // Maximum array dimension
char buffer[MAX]; // Input buffer
int count = 0; // Character count
cout << "Enter a string of less than 80 characters:\n";
cin.getline(buffer, MAX, '\n'); // Read a string until \n
while(buffer[count]!= '\0') // Increment count as long as
count++; // the current character is not null
cout << endl
<< "The string \"" << buffer
<< "\" has " << count << " characters.";
cout << endl;
**************************************
use "cin.getline(85,'\n')" from <iostream>, as you say, this can be
easily found in any book or tutorial.
Puime
Le 22 mars 05, à 03:56, Verne H. Bohlender a écrit :
> Nice Alfred, mine lived well into his 95th year but the last few he was
> dozy. I don't want that and just too much to learn. Something I'm stuck on
> right now is if I ask someone a question and want to be able to cout the
> entire line, just how do I use char for that. I know that char name [85];
> lets one enter a good long name but I want a means of picking up a
> sentence. I'm sure it's in the book some place but not entirely sure where
> to look or what to look for. Any help on this simple thing.
> Verne
>
> I'm impressed Verne! I'm 46, BTW, so I'm not that young! I've read that an
> active mind keeps you from aging. So keep working with it! My dad lived to
> be 90 years old, and stayed very mentally active until the end.
>
> Linux is kind of inscrutable, but excellent if you want full control of
> your machine and are a power user. Windows XP is very user friendly,
> however you pay for that with loss of control. It's also my opinion that
> XP 'borrowed' features from Linux, as XP has features that none of the
> previous Windows OS's had.
>
> Helping is my way of paying back for any and all past help. It balances
> the scales of karma, so to speak.
>
> Sincerely,
>
> Al
>
> "Verne H. Bohlender" <ve...@sy...> wrote:
> I think you're so right, Alfred, as the two just don't mix if you use the
> wrong stuff. I'm still very new to it but getting to really love it for
> experimenting around and have a few nice simple programs working to my
> satisfaction now. I'm an old man by age but young at heart at 76 so have
> the time to help where I can. So all can know once and for all I'm using
> Ivor Horton's huge book which really goes into C++ with a bang. You young
> guys learn when you're young as it's harder to sink in as you get older. I
> used to do a lot of work with Lattice C on the Old Amiga Computer which
> was the best little computer around but. . . .one has to move on. I'm
> using XP now which is as far as I'm going but have looked at the other
> side a bit and for those who use Linux or what ever that's a good platform
> too. My son got me halfway into it and then left me floating until I got
> back to my Windows. Have fun guys and help the other guys out as that
> makes it even more fun.
>
> Verne
> <snip>
>
>
>
>
>
> Alfred P. Reaud
> <Happy_Cat_Technologies_Business_Card.gif>
|