473,386 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

What's wrong ?

Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a "printf" at
the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel
Mar 6 '08 #1
20 2784
Daniel.C wrote:
Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a "printf" at
the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel

You have to input an end of file character
since that is the condition you specified.

Under windows you would type ctrl+Z under linux
you would type ctrl+d
--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Mar 6 '08 #2
In article <47**********************@news.free.fr>,
Daniel.C <dc*************@free.frwrote:
>I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}
>There is no output, and no completion either.
Are you giving it some input on standard input? Either by typing some
characters followed by an end-of-file indication (probably control-Z
or control-D), or redirecting from a file?

-- Richard
--
:wq
Mar 6 '08 #3
Daniel.C wrote:
Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a "printf" at
the end of the code, but it doesn't display.
Until getchar() returns EOF, this program just counts
silently and produces no output. The output appears after
end-of-input is detected.
i'm using MinGW developer studio with windows XP home.
If the input is coming from your keyboard, simply taking
your hands away and deciding not to press any more keys won't
tell the program that you're finished typing. For all it
knows, you're thinking Very Hard or temporarily away on a
bathroom break or something, and it will keep waiting for
that next key. On Windows, the convention is to press ctrl-Z
to indicate "Th-th-that's all, folks!" Other systems have
other conventions.

If the input is coming from somewhere else, there will
be other, source-specific ways to indicate that it's all
finished. Disk-resident files typically need no help, but
things like sockets might.

--
Eric Sosman
es*****@ieee-dot-org.invalid
Mar 6 '08 #4
"Richard Tobin" <ri*****@cogsci.ed.ac.uka écrit dans le message de news:
fq**********@pc-news.cogsci.ed.ac.uk...
In article <47**********************@news.free.fr>,
Daniel.C <dc*************@free.frwrote:
>>I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}
>>There is no output, and no completion either.

Are you giving it some input on standard input? Either by typing some
characters followed by an end-of-file indication (probably control-Z
or control-D), or redirecting from a file?

-- Richard
--
:wq
Many thanks to all contributors.
Daniel
Mar 6 '08 #5
"Daniel.C" wrote:
>
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
int main(void)
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
return 0;
}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.
Your book is obsolete and wrong. C99 requires the int in the
declaration of main, and the void for parameters is just good
practice. C99 will supply a default return value, but earlier
standards don't. Thus your code is wrong for any version.

If it doesn't work with the above simple changes, your compiler
system is fouled.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
--
Posted via a free Usenet account from http://www.teranews.com

Mar 6 '08 #6
CBFalconer wrote:
"Daniel.C" wrote:
>>
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()

int main(void)
>{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);

return 0;
>}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

Your book is obsolete and wrong.
The example probably came from K&R2. So you are saying it's obsolete and
wrong. On what basis?
C99 requires the int in the
declaration of main, and the void for parameters is just good
practice. C99 will supply a default return value, but earlier
standards don't. Thus your code is wrong for any version.
They were omitted for brevity, as you well know.
If it doesn't work with the above simple changes, your compiler
system is fouled.
No, his problem is already solved, and it was not a compiletime one.
Mar 6 '08 #7
"jacob navia" <ja***@nospam.orga écrit dans le message de news:
47*********************@news.orange.fr...
Daniel.C wrote:
>Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a "printf"
at the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel
You have to input an end of file character
since that is the condition you specified.

Under windows you would type ctrl+Z under linux
you would type ctrl+d

Just a precision. In the following code :

#include <stdio.h>

main()
{
int c;
while ((c = getchar()) != EOF)
putchar(c);
}
the enter key triggers the execution of the code. I certainly misunderstand
something. What is the difference between the two ?
Sorry, it's a painful beginning...
Daniel
Mar 6 '08 #8
Daniel.C wrote:
"jacob navia" <ja***@nospam.orga écrit dans le message de news:
47*********************@news.orange.fr...
>Daniel.C wrote:
>>Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel
You have to input an end of file character
since that is the condition you specified.

Under windows you would type ctrl+Z under linux
you would type ctrl+d

Just a precision. In the following code :

#include <stdio.h>

main()
{
int c;
while ((c = getchar()) != EOF)
putchar(c);
}
the enter key triggers the execution of the code. I certainly
misunderstand something. What is the difference between the two ?
In the loop above getchar() continues getting characters until it
detects end-of-file. This can happen either due to normal termination
of input or due to an error. You need to call other functions to
disambiguate between the two, which you do not need to worry about just
yet.

Normally to signal end-of-file from the keyboard you need to type a
system specific key sequence. For Windows it is CTRL-Z (Press the 'z'
key with the CONTROL key depressed) and it is CTRL-D for UNIX. Under
these systems simply hitting ENTER should not terminate the above loop.
Other systems may have other key sequences and semantics about input.
Generally I/O has been a very system specific and messy area of
programming.

Coming to the difference. ENTER is significant when the program
recieving your input is set to the so called "line input" mode. Most
interactive programs are set in this mode. In this mode the program
will continue getting input until a end-of-line sequence is detected.
This is commonly generated by pressing ENTER from keyboards.

Your program above is not an interactive program in the sense that it
can be used as a "filter" and as an element in a sequence of connected
commands. Usually in non-interactive input, end-of-file rather than
end-of-line signals end of input. This is because of various historical
reasons having to do with the idiosyncrasies of systems originating in
the fifties and sixties. They became very idiomatic and got stuck as a
practise.

In C, at this stage, all you need to remember is that for
non-interactive input, collect input until an end-of-file or error
occurs (which most C functions indicate by returning the value EOF
instead of a normal value). For interactive input (where you expect a
user to enter the input) you should usually collect input until you
receive a '\n' character (which is what the C library uses to represent
the system specific end-of-line sequence).
Sorry, it's a painful beginning...
Yes. I/O is generally confusing for newbies, particularly in languages
like C which expose a lot of low-level characteristics.

Mar 6 '08 #9


"santosh" <sa*********@gmail.coma écrit dans le message de news:
fq**********@registered.motzarella.org...
Daniel.C wrote:
>"jacob navia" <ja***@nospam.orga écrit dans le message de news:
47*********************@news.orange.fr...
>>Daniel.C wrote:
Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel
You have to input an end of file character
since that is the condition you specified.

Under windows you would type ctrl+Z under linux
you would type ctrl+d

Just a precision. In the following code :

#include <stdio.h>

main()
{
int c;
while ((c = getchar()) != EOF)
putchar(c);
}
the enter key triggers the execution of the code. I certainly
misunderstand something. What is the difference between the two ?

In the loop above getchar() continues getting characters until it
detects end-of-file. This can happen either due to normal termination
of input or due to an error. You need to call other functions to
disambiguate between the two, which you do not need to worry about just
yet.

Normally to signal end-of-file from the keyboard you need to type a
system specific key sequence. For Windows it is CTRL-Z (Press the 'z'
key with the CONTROL key depressed) and it is CTRL-D for UNIX. Under
these systems simply hitting ENTER should not terminate the above loop.
Other systems may have other key sequences and semantics about input.
Generally I/O has been a very system specific and messy area of
programming.

Coming to the difference. ENTER is significant when the program
recieving your input is set to the so called "line input" mode. Most
interactive programs are set in this mode. In this mode the program
will continue getting input until a end-of-line sequence is detected.
This is commonly generated by pressing ENTER from keyboards.

Your program above is not an interactive program in the sense that it
can be used as a "filter" and as an element in a sequence of connected
commands. Usually in non-interactive input, end-of-file rather than
end-of-line signals end of input. This is because of various historical
reasons having to do with the idiosyncrasies of systems originating in
the fifties and sixties. They became very idiomatic and got stuck as a
practise.

In C, at this stage, all you need to remember is that for
non-interactive input, collect input until an end-of-file or error
occurs (which most C functions indicate by returning the value EOF
instead of a normal value). For interactive input (where you expect a
user to enter the input) you should usually collect input until you
receive a '\n' character (which is what the C library uses to represent
the system specific end-of-line sequence).
>Sorry, it's a painful beginning...

Yes. I/O is generally confusing for newbies, particularly in languages
like C which expose a lot of low-level characteristics.
Thank you very much for your detailed explanations.
Daniel
Mar 6 '08 #10
CBFalconer <cb********@yahoo.comwrites:
"Daniel.C" wrote:
>>
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()

int main(void)
Yes, that's an improvement.
>{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);

return 0;
Yes, that's also an improvement.
>}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

Your book is obsolete and wrong. C99 requires the int in the
declaration of main, and the void for parameters is just good
practice. C99 will supply a default return value, but earlier
standards don't. Thus your code is wrong for any version.
Neither version of the standard defines the term "wrong", so it's not
clear what you're talking about.

The declaration "main()" is legal for C90. (There's a subtle argument
that the void keyword might be necessary, but since ANSI was careful
not to break existing code, it was clearly the intent that
"main() { ... }" should be acceptable.)

Support for C90 is much more widespread than support for C99, and even
compilers that do support C99 will almost certainly do no more than
issue a warning for the implicit int return type. (Which is not to
say that such a warning should be ignored, of course.)

As for the missing return statement, in C90 that merely causes an
undefined status to be returned to the calling environment. If the
environment doesn't use the status (say, if you type "./prog" to a
Unix shell), then this likely won't make any difference; at worst, it
might result in some harmless message after the program terminates.

Having said that, yes, both changes you suggest are certainly
improvements, but they don't necessarily tranform the program from
being "wrong" to being "right".
If it doesn't work with the above simple changes, your compiler
system is fouled.
If the above simple changes make any relevant difference to the
behavior of the program, I'll be astonished. We now know what the
problem was, and it would have shown up in exactly the same way with
your suggested changes in place.

I probably would have mentioned these things myself if they hadn't
already been covered by others. Actually, though, what bothered me
more was the way the source code was formatted. Here's a modified
version of the program with your changes and better layout (I also
added a pair of braces):

#include <stdio.h>
/* count characters in input; 1st version */
int main(void)
{
long nc;

nc = 0;
while (getchar() != EOF) {
++nc;
}
printf("%ld\n", nc);
return 0;
}

The point here (I'm addressing the OP now) is that consistent
indentation makes the structure of the program much easier to see. It
doesn't matter much for something this small, but it's vital for
larger and more complex programs, and it's a good idea to get into the
habit as early as possible.

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 6 '08 #11
santosh <sa*********@gmail.comwrites:
CBFalconer wrote:
>"Daniel.C" wrote:
>>>
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()

int main(void)
>>{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);

return 0;
>>}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

Your book is obsolete and wrong.

The example probably came from K&R2. So you are saying it's obsolete and
wrong. On what basis?
This should be good....
Mar 6 '08 #12
santosh wrote:
CBFalconer wrote:
>"Daniel.C" wrote:
>>>
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()

int main(void) <<< **** CHECK THIS *****
>>{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);

return 0; <<< **** AND THIS *****
>>}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

Your book is obsolete and wrong.

The example probably came from K&R2. So you are saying it's obsolete and
wrong. On what basis?
C99 requires the int in the
declaration of main, and the void for parameters is just good
practice. C99 will supply a default return value, but earlier
standards don't. Thus your code is wrong for any version.

They were omitted for brevity, as you well know.
As I explained above, one of the error fouls C89 thru C95, the
other fouls on C99. So his compiler is accepting erroneous code -
no need to encourage it. Of course I didn't think of the simple
solution of the OP not knowing how to signal EOF. But that is
another subject. The code is still WRONG.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Mar 6 '08 #13
Keith Thompson wrote:
>
.... snip ...
>
Support for C90 is much more widespread than support for C99, and even
compilers that do support C99 will almost certainly do no more than
issue a warning for the implicit int return type. (Which is not to
say that such a warning should be ignored, of course.)
I wonder. Since int is no longer a default type, the untyped
procedure definition is, I think, a syntax error, and requires a
complaint. The standard doesn't differentiate between errors and
warnings or anything else.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Mar 6 '08 #14
Daniel.C wrote:
Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a "printf" at
the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel

Firstly, you ought to use Linux instead, but that is moot :P

To answer your question, what is the command line you use to run your
program?

If it is something like "a.out < file" EOF will actually be sent to
stdin (where your program is reading data from) when the file "file"
ends. However, if you ran it like "a.out", stdin is connected to your
tty (console) and the program is waiting for EOF (and looking like it
hung). Most standard UNIX consoles will allow you to type control-d for
EOF; try typing your input and then this. Enter simply inputs the
newline sequence, which is not EOF.

--
--Falcon Kirtaran
Mar 7 '08 #15
CBFalconer <cb********@yahoo.comwrites:
Keith Thompson wrote:
... snip ...
>>
Support for C90 is much more widespread than support for C99, and even
compilers that do support C99 will almost certainly do no more than
issue a warning for the implicit int return type. (Which is not to
say that such a warning should be ignored, of course.)

I wonder. Since int is no longer a default type, the untyped
procedure definition is, I think, a syntax error, and requires a
complaint. The standard doesn't differentiate between errors and
warnings or anything else.
Right, and a pure C99 implementation certainly *could* treat "main()"
as a syntax error. But I doubt that any of them do so. I suspect
that most or all of them use a grammar that recognizes implicit int so
they can print a meaningful error message (or allow it either as an
extension or in a C90-conforming mode).

--
Keith Thompson (The_Other_Keith) <ks***@mib.org>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Mar 7 '08 #16
Many thanks.
Daniel
"Falcon Kirtaran" <fa********@iridiumlinux.orga écrit dans le message de
news: fq**********@akira.iridiumlinux.org...
Daniel.C wrote:
>Hello.
I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()
{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);
}

There is no output, and no completion either. I tried adding a "printf"
at the end of the code, but it doesn't display.

i'm using MinGW developer studio with windows XP home.

Thanks in advance.
Daniel

Firstly, you ought to use Linux instead, but that is moot :P

To answer your question, what is the command line you use to run your
program?

If it is something like "a.out < file" EOF will actually be sent to stdin
(where your program is reading data from) when the file "file" ends.
However, if you ran it like "a.out", stdin is connected to your tty
(console) and the program is waiting for EOF (and looking like it hung).
Most standard UNIX consoles will allow you to type control-d for EOF; try
typing your input and then this. Enter simply inputs the newline
sequence, which is not EOF.

--
--Falcon Kirtaran

Mar 7 '08 #17
CBFalconer wrote:
santosh wrote:
>CBFalconer wrote:
>>"Daniel.C" wrote:

I just copied this code from my book with no modification :

#include <stdio.h>
/* count characters in input; 1st version */
main()

int main(void) <<< **** CHECK THIS *****

{
long nc;

nc = 0;
while (getchar() != EOF)
++nc;
printf("%ld\n", nc);

return 0; <<< **** AND THIS *****

}

There is no output, and no completion either. I tried adding a
"printf" at the end of the code, but it doesn't display.

Your book is obsolete and wrong.

The example probably came from K&R2. So you are saying it's obsolete
and wrong. On what basis?
C99 requires the int in the
declaration of main, and the void for parameters is just good
practice. C99 will supply a default return value, but earlier
standards don't. Thus your code is wrong for any version.

They were omitted for brevity, as you well know.

As I explained above, one of the error fouls C89 thru C95, the
other fouls on C99. So his compiler is accepting erroneous code -
no need to encourage it. Of course I didn't think of the simple
solution of the OP not knowing how to signal EOF. But that is
another subject. The code is still WRONG.
The program isn't in error for C90. It merely returns an unspecified
status value. I don't think that invokes undefined behaviour.

Mar 7 '08 #18
santosh said:
CBFalconer wrote:
<snip>
>>>Your book is obsolete and wrong.

The example probably came from K&R2. So you are saying it's obsolete
and wrong. On what basis?
The example is indeed from K&R2 (top of page 18, in fact). K&R2 is neither
obsolete nor wrong.

<snip>
>As I explained above, one of the error fouls C89 thru C95,
No, it doesn't. The behaviour of the program under C89 through C95 is
well-defined. The *termination status* is undefined, but that isn't an
error.
>the
other fouls on C99.
....for which everyone and his cat has a conforming compiler, of course. I
Don't Think So.
>So his compiler is accepting erroneous code -
No, his compiler is accepting correct code. I consider Chuck's amendments
to improve the style of the code, but the code as written works just fine.
>no need to encourage it. Of course I didn't think of the simple
solution of the OP not knowing how to signal EOF. But that is
another subject. The code is still WRONG.

The program isn't in error for C90. It merely returns an unspecified
status value. I don't think that invokes undefined behaviour.
Well, it's an undefined termination status, but that's all. The program
does not rely on any unspecified, undefined, or implementation-defined
behaviour (unless you count the possibility of overflowing a long int,
which would take quite a while to achieve), so it can be argued that it is
strictly conforming.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Mar 7 '08 #19
santosh wrote:
CBFalconer wrote:
.... snip ...
>
>As I explained above, one of the error fouls C89 thru C95, the
other fouls on C99. So his compiler is accepting erroneous code
- no need to encourage it. Of course I didn't think of the
simple solution of the OP not knowing how to signal EOF. But
that is another subject. The code is still WRONG.

The program isn't in error for C90. It merely returns an unspecified
status value. I don't think that invokes undefined behaviour.
Why shouldn't the OS have a provision: I won't display the output
unless the program completes successfully?

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

--
Posted via a free Usenet account from http://www.teranews.com

Mar 8 '08 #20
CBFalconer said:
santosh wrote:
>CBFalconer wrote:
... snip ...
>>
>>As I explained above, one of the error fouls C89 thru C95, the
other fouls on C99. So his compiler is accepting erroneous code
- no need to encourage it. Of course I didn't think of the
simple solution of the OP not knowing how to signal EOF. But
that is another subject. The code is still WRONG.

The program isn't in error for C90. It merely returns an unspecified
status value. I don't think that invokes undefined behaviour.

Why shouldn't the OS have a provision: I won't display the output
unless the program completes successfully?
Think about it. If your OS behaved like that, you'd be typing blind. Even
if the OS provided input echo (which it might argue "doesn't really count
as output"), you'd still be stuffed, because the program would block for
input without ever once displaying a prompt. Even with a "prompts
cribsheet", at some point an average user is bound to make a few mistakes
that the program can detect. Noticing your own mistakes (without being
told about them) and keeping track of your retries in your head so that
you can keep your place on the cribsheet is going to be extremely tedious
and error-prone. And then, when you finally got sick of it and managed to
work out how to quit the program without any prompts, you'd get an
enormous list of all the prompts you should have had during the program
run...

It ain't ever gonna sell.

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Mar 8 '08 #21

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

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
5
by: titan0111 | last post by:
#include<iostream> #include<iomanip> #include<cstring> #include<fstream> using namespace std; class snowfall { private: int ft;
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
28
by: Madhur | last post by:
Hello what about this nice way to open a file in single line rather than using if and else. #include<stdio.h> void main() { FILE *nd; clrscr();...
56
by: Cherrish Vaidiyan | last post by:
Frinds, Hope everyone is doing fine.i feel pointers to be the most toughest part in C. i have just completed learning pointers & arrays related portions. I need to attend technical interview on...
46
by: Keith K | last post by:
Having developed with VB since 1992, I am now VERY interested in C#. I've written several applications with C# and I do enjoy the language. What C# Needs: There are a few things that I do...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
9
by: Pyenos | last post by:
import cPickle, shelve could someone tell me what things are wrong with my code? class progress: PROGRESS_TABLE_ACTIONS= DEFAULT_PROGRESS_DATA_FILE="progress_data" PROGRESS_OUTCOMES=
3
by: Siong.Ong | last post by:
Dear all, my PHP aims to update a MySQL database by selecting record one by one and modify then save. Here are my PHP, but I found that it doesnt work as it supposed to be, for example, when...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.