www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/31/18:36:04

Date: Wed, 31 Dec 1997 18:35:46 -0500 (EST)
Message-Id: <199712312335.SAA02802@p2.acadia.net>
To: "Erik" <edroszcz AT algonet DOT se>
Subject: Re: Input/Output
Cc: djgpp AT delorie DOT com
References: <01bd1616$a61f4280$7afd64c3 AT win95 DOT algonet DOT se>
in-reply-to: <01bd1616$a61f4280$7afd64c3@win95.algonet.se>
From: swarnerx3 AT acadia DOT net (Scott Warner)
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019