Cat,
Thanks for your reply as it added to the answers I had found yesterday searching this forum for string AND literal. I have a pretty good understanding of what is taking place there now.
...
Type: Posts; User: Black-Hearted
Cat,
Thanks for your reply as it added to the answers I had found yesterday searching this forum for string AND literal. I have a pretty good understanding of what is taking place there now.
...
Will try that, I did'nt have 'literal' in my earlier searches.
Thanks,
BH
Hello again,
Ran into a problem with the following, maybe someone can explain.
char* str="abc";
*(str+0) = *(str+2); //Program Dumps
or
char temp[]="abc";
FromHolland,
adrianX is correct, although this will still give you a zero value for "z" if you input a lowercase menu choice.
add:
#include <ctype.h>
and change your switch statement to:
Dev will compile with either:
#include <iostream>
using namespace std;
or
#include <iostream.h>
Cat,
Sorry for the confusion, I have VS.net installed, but it is a pain in the butt for the little C++ programs I have to write for now. Plus the book we are using for the class was written in...
Agreed, I found out the same by messing around with how the "extra" was stored. Just call cin.sync() after your 1st cin as Zach said and your good to go. Seems kind of weird that one 'Enter' can get...
That was exactly what I was looking for! Thanks for everyone's help. VS.Net help is a nightmare =-\.
BH:D
"I like a man who grins when he fights."
- Winston...
Hello,
First off, thanks for all the replies and help. This is actually a very basic program (have'nt hit DEFINE's yet o.O), and I am using a char variable to store a menu choice.
It seems that...
Hello All,
I'm brand new to C++ and have run into a problem when my program asks for a character to be input (like a menu choice), I'm allowed to type in as much or as little as i want while the...