🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: att.lang.c++
Article #103

scan string to a pointer

#103
From: morano
Date: Mon, 26 Nov 2001 13:14
7 lines
1315 bytes
Hi,
I was trying to scan a string from the keyboard

scanf and puts would work if my string was declared as an array.

However, My string is declared as a pointer, how can i scan a value to this
pointer location. I tried gets(&string) even gets(*string) yet didnt work
Technical Details
Message-ID: <9ttf05$9od3@news-dxb.emirates.net.ae>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!news-dxb.emirates.net.ae!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d4ba,3cb615a1bc522f6e,start
X-Google-Attributes: gid10d4ba,public
X-Google-Thread: 1014db,3cb615a1bc522f6e,start
X-Google-Attributes: gid1014db,public
X-Google-Thread: 109fba,3cb615a1bc522f6e,start
X-Google-Attributes: gid109fba,public
X-Google-ArrivalTime: 2001-11-26 05:19:56 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news1.google.com!newsfeed.stanford.edu!news.ems.psu.edu!news.cis.ohio-state.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!nycmny1-snf1.gtei.net!news.gtei.net!news-dxb.emirates.net.ae!not-for-mail
From: "morano" <alomrani@emirates.net.ae>
Newsgroups: att.lang.c++,comp.lang.c,comp.lang.c++
Subject: scan string to a pointer
Date: Mon, 26 Nov 2001 17:14:46 +0400
Organization: EIM
Lines: 9
Message-ID: <9ttf05$9od3@news-dxb.emirates.net.ae>
NNTP-Posting-Host: 217.164.251.21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200