๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #120

Re: convert *char to string

#120
From: Andreas Kahari
Date: Fri, 14 Jan 2000 00:00
26 lines
1548 bytes
In article <387ed1c7@grissom>,
  "Jarne Cook" <jarne@powerup.com.au> wrote:
> Can anyone tell me how to convert a char* to a string or get access to
each
> charater one by one.
>
> I am trying to get char* argv[1] ( the first argument) so that I can
> manipulate each character.  Can someone PLEEEZE tell me if there is a
> standard c++ call to do that.
[cut]

'argv[1][0]' is the first character of the second string in 'argv',
'argv[1][1]' is the second character of the same string. What's your
problem?

/A

--
+---------------------+
| Andreas K๏ฟฝh๏ฟฝri
| Uppsala, Sweden
+---------------------+


Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID: <85mqin$hmm$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <387ed1c7@grissom>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 109fba,9c3f098f257151c0
X-Google-Attributes: gid109fba,public
X-Google-Thread: 10d4ba,9c3f098f257151c0
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: 114592,9c3f098f257151c0
X-Google-Attributes: gid114592,public
From: Andreas Kahari <andkaha@my-deja.com>
Subject: Re: convert *char to string
Date: 2000/01/14
Message-ID: <85mqin$hmm$1@nnrp1.deja.com>
X-Deja-AN: 572472587
References: <387ed1c7@grissom>
X-Http-Proxy: 1.0 bazaar:3128 (Squid/2.2.STABLE5), 1.0 x32.deja.com:80 (Squid/1.1.22) for client 130.238.17.136, 130.238.17.136
Organization: Deja.com - Before you buy.
X-Article-Creation-Date: Fri Jan 14 09:34:15 2000 GMT
X-MyDeja-Info: XMYDJUIDandkaha
Newsgroups: alt.comp.lang.learn.c-c++,att.lang.c++,comp.lang.c++
X-Http-User-Agent: Mozilla/4.7 [en] (X11; I; SunOS 5.7 sun4u)