C programming help
Karl Larsen
klarsen1 at gmail.com
Sun Apr 18 22:39:40 UTC 2010
On 04/18/2010 04:28 PM, andrew clarke wrote:
> On Sun 2010-04-18 15:54:09 UTC-0600, Karl Larsen (klarsen1 at gmail.com) wrote:
>
>
>>> On Sun 2010-04-18 14:29:16 UTC+0200, Ugur Arpaci (ugurarpaci at gmail.com) wrote:
>>>
>
>>>> The problem is; i must make those changing on Terminal by moving cursor
>>>> left and right by arrow keys.
>>>>
>> Here is a general string using c code from The New C Primer
>> Plus, Second Edition SAMS Publishing. This is the example strings.c
>> shown on page 360 which I had to correct several errors in. But this
>> works fine.
>>
>> It is attached to this message. I hope it makes it.
>>
> It made it but is irrelevant to the OP's question, due to the cursor
> key movement requirement.
>
> I don't think you read the OP's original question, or did not
> understand it.
>
> Incidentally gets() is dangerous and should NEVER be used because of
> lack of bounds checking.
>
>
That is never mentioned in my book. I wonder why? I saw he was
trying to handle strings and this shows a few ways. If he wants
something to happen when he moves his cursor left and right I do not
know how to sense that. But sure there must be some standard C that will
sense the cursor.
Also glad to see the standard C works fine with the 10.04 Ubuntu
gcc call. I had not verified that for straight C. I already discovered
the change in C++ which was not hard to fix.
73 Karl
--
Karl F. Larsen, AKA K5DI
Linux User
#450462 http://counter.li.org.
Key ID = 3951B48D
More information about the ubuntu-users
mailing list