473,466 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reading a string of unknown size

I have to read characters from stdin and save them in a string. The
problem is that I don't know how much characters will be read.

Francesco
--
-------------------------------------

http://www.riscossione.info/
Nov 25 '06
111 19902
Mark McIntyre wrote:
"Old Wolf" <ol*****@inspire.net.nzwrote:
>If many people think a word means something, then they are
correct by definition.

This is a false conclusion. Just becase thousands of ignoramuses
think "enormity" is a symonym for "huge", don't make it so.
Or that someone who indulges in physical exercise is an
"athalete". Or that a power pile (a silly way to boil water) is a
"nucular" reactor. Or that "fast" means "quickly". I may have to
give up on the last, I even caught Winston Chuchill using it.
Sigh.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Dec 4 '06 #101
Mark McIntyre wrote:
>
On 3 Dec 2006 12:39:27 -0800, in comp.lang.c , "Old Wolf"
<ol*****@inspire.net.nzwrote:
If many people think a word means something, then they are
correct by definition.

This is a false conclusion. Just becase thousands of ignoramuses think
"enormity" is a symonym for "huge", don't make it so.
The meaning of words isn't set by some
authority. Instead, dictionaries try to reflect actual usage.

to an extent, but only to an extent, and always in broad terms not
colloquial ones.
There are thousands of words (probably more) in current usage
today that had different meanings decades ago. It's called
language evolution.

true
If by "many people", Old Wolf means "the majority",
then I'm with Old Wolf on this one.

--
pete
Dec 4 '06 #102
In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
>Or that "fast" means "quickly". I may have to
give up on the last, I even caught Winston Chuchill using it.
What grounds could you possibly have for denying it? The OED has
quotations back to c1205.

-- Richard

--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Dec 4 '06 #103
Richard Tobin said:
In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
>>Or that "fast" means "quickly". I may have to
give up on the last, I even caught Winston Chuchill using it.

What grounds could you possibly have for denying it? The OED has
quotations back to c1205.
1205 was only about eighty minutes ago. I don't know whether to be appalled
that you are relying on such a short usage history or impressed at how up
to date your copy of OED is.

--
Richard Heathfield
"Usenet is a strange place" :-) dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Dec 4 '06 #104
On Mon, 04 Dec 2006 12:58:30 GMT, in comp.lang.c , pete
<pf*****@mindspring.comwrote:
>Mark McIntyre wrote:
>>
On 3 Dec 2006 12:39:27 -0800, in comp.lang.c , "Old Wolf"
<ol*****@inspire.net.nzwrote:
>If many people think a word means something, then they are
correct by definition.

This is a false conclusion. Just becase thousands of ignoramuses think
"enormity" is a symonym for "huge", don't make it so.

If by "many people", Old Wolf means "the majority",
then I'm with Old Wolf on this one.
Tell that to any random majority whose language forms were suppressed
by central authority. I dunno, Scousers say.
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Dec 4 '06 #105
In article <8s********************************@4ax.com>,
Mark McIntyre <ma**********@spamcop.netwrote:
>>If by "many people", Old Wolf means "the majority",
then I'm with Old Wolf on this one.
>Tell that to any random majority whose language forms were suppressed
by central authority. I dunno, Scousers say.
Suppression by central authority is the opposite of what Old Wolf was
talking about. If people use "enormity" to mean great size, that's
what it means, regardless of central authority's view. If they try to
change - or preserve - the language they may or may not succeed: it
depends whether people obey them.

In the case of "enormity" I can't see any reason to prefer the older
meaning. "Enormous" now unambiguously means huge, so why should
"enormity" mean something different? And of course the
central-authority-approved meaning - monstrous wickedness - does not
correspond to the etymology, which would simply imply "outside the
norm" without any particular negative or moral connotation.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Dec 4 '06 #106
On 4 Dec 2006 22:33:33 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
>talking about. If people use "enormity" to mean great size, that's
what it means, regardless of central authority's view.
absolute rubbish.
>In the case of "enormity" I can't see any reason to prefer the older
meaning.
then apparently you're an ignoramus.

--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Dec 5 '06 #107
Mark McIntyre wrote:
On 4 Dec 2006 22:33:33 GMT, in comp.lang.c , ri*****@cogsci.ed.ac.uk
(Richard Tobin) wrote:
talking about. If people use "enormity" to mean great size, that's
what it means, regardless of central authority's view.

absolute rubbish.
That's the way language works.
In the case of "enormity" I can't see any reason to prefer the older
meaning.

then apparently you're an ignoramus.
Do you use "girl" to mean a young person of either sex? It used to mean
that. "Awful" used to mean exclusively "inspiring awe", now it has come
to disagreeable or offensive. Are people who prefer that over the
original ignoramuses?


Brian
Dec 6 '06 #108
Default User wrote:
>
.... snip ...
>
Do you use "girl" to mean a young person of either sex? It used to
mean that. "Awful" used to mean exclusively "inspiring awe", now it
has come to disagreeable or offensive. Are people who prefer that
over the original ignoramuses?
Are you possibly confusing "awesome" and "awful"?

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
Dec 7 '06 #109
In article <45***************@yahoo.com>,
CBFalconer <cb********@maineline.netwrote:
>Do you use "girl" to mean a young person of either sex? It used to
mean that. "Awful" used to mean exclusively "inspiring awe", now it
has come to disagreeable or offensive. Are people who prefer that
over the original ignoramuses?
>Are you possibly confusing "awesome" and "awful"?
No, he's not. That is the original meaning of "awful".

"Awesome" is now experiencing a similar change (though in a more
positive direction). Whether it will result in "awesome" meaning
merely "good", or whether it is just a passing fad, remains to be
seen.

-- Richard
--
"Consideration shall be given to the need for as many as 32 characters
in some alphabets" - X3.4, 1963.
Dec 7 '06 #110
CBFalconer wrote:
Default User wrote:
... snip ...

Do you use "girl" to mean a young person of either sex? It used to
mean that. "Awful" used to mean exclusively "inspiring awe", now it
has come to disagreeable or offensive. Are people who prefer that
over the original ignoramuses?

Are you possibly confusing "awesome" and "awful"?
Nope. There's the oft-quoted remark (whether true or not is not clear)
from Queen Anne regarding Christopher Wren's work on St. Paul's
Cathedral, where she described it as "awful, artificial and amusing."

This might seem disparaging, but "awful" meant "awe-inspiring",
"artificial" was "clever" or "artistic", and "amusing" meant something
like "riveting".


Brian
Dec 7 '06 #111
"Default User" <de***********@yahoo.comwrote:
Nope. There's the oft-quoted remark (whether true or not is not clear)
from Queen Anne regarding Christopher Wren's work on St. Paul's
Cathedral, where she described it as "awful, artificial and amusing."

This might seem disparaging, but "awful" meant "awe-inspiring",
"artificial" was "clever" or "artistic", and "amusing" meant something
like "riveting".
True, but unlike "enormity" and "redundant", those are never used in the
old meaning any more.

Richard
Dec 8 '06 #112

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: jamait | last post by:
Hi all, I m trying to read in a text file into a datatable... Not sure on how to split up the information though, regex or substrings...? sample: Col1 Col2 ...
19
by: Lionel B | last post by:
Greetings, I need to read (unformatted text) from stdin up to EOF into a char buffer; of course I cannot allocate my buffer until I know how much text is available, and I do not know how much...
3
by: syntax | last post by:
hi, i want to read a file using fread() in equal chunks through a for loop so that at the last call i dont get error..which way, i should read it? let me give an example, suppose i have 100...
6
by: dough | last post by:
Heres a snippet of my code. I am trying to dynamically allocate memory for reading in strings from a file. FILE *f; /* file to read */ char *s; ...
2
by: Chuck Ritzke | last post by:
Hi all, I am getting an intermittant error after uploading a project from my development machine. I click on a link which opens an aspx page that, upon page load, reads a very small amount of...
10
by: sposes | last post by:
Im very much a newbie but perhaps somehone can help me. Ive been searching for a way to convert a std::string to a unsigned char* The situation is I have a function that wants a unsigned char*...
9
by: dgleeson3 | last post by:
Hello All I have a txt file of strings of different lengths. I dont know how many strings are in the file. I have no problem reading the file and sending to the console (as below). To...
3
by: cppman | last post by:
Hello, I am very new to C++ programming. I am trying to read a file with very large strings back to back, no commas or any other seperations between characters in a string and the size of the...
6
by: diegoblin | last post by:
hello, i have this issue.Every time i use sockets if i use a "String" as a parameter the connection resets. but if i put the ip address like this "127.0.0.1" it okay. and i got this message if i...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.