How does the program receive the map? As a command-line parameter? Or is that implementation-defined?
How does the program receive the map? As a command-line parameter? Or is that implementation-defined?
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Yeah, a filename supplied by a command-line parameter:
The task:
Write a program in standard C89 or C++98 (including the STL) to implement a wireworld simulation.
The program will be given a single command line parameter, namely the name of the configuration file in the above format.
If you understand what you're doing, you're not learning anything.
Oops, I missed that, thanks.
Should the program assume that the terminal is 80x25? If the input file is 80 wide, for the tty implementation under DOS, you can't print a newline after the text.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
In *nix there are environment variables COLUMNS and LINES which give the dimensions of the screen.
Last edited by zx-1; 09-22-2006 at 06:02 PM.
System: Debian Sid and FreeBSD 7.0. Both with GCC 4.3.
Useful resources:
comp.lang.c FAQ | C++ FQA Lite
Have you all checked this out? (java example of wireworld)