Mail Archives: djgpp/1997/12/31/18:36:04
I'm not sure your question belongs here. However, it sounds like you need some basic knowledge on using C++ (and C) strings. I refer you to
http://www.wtvl.net/mike/webjr/begcpp.htm
Strings in C and C++ are stored and character arrays, not char. There is also, I understand, a C++ string object in the draft ANSI (yes? not sure).
Hope this helps.
> I have a question about Input and Output in C++. I was trying to make a
> program that asks for a string.
>
> This is how far I got:
>
> #include <iostream.h>
>
> int main()
> {
> char txt;
>
> cout << "Print a string: " << endl;
>
> So far I´ve got variable of the type CHAR called "txt". In txt should that
> you write be stored.
http://www.wtvl.net/mike/webjr/begcpp.htm
- Raw text -