473,396 Members | 1,891 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,396 software developers and data experts.

stdout

I have an MFC app with a simple dialog but I want to now not
instantiate the dialog but still let the remainder of the exe run to
completion and print the results to standard out ( just as a Win32
console app does ) in the good old Hello World example using cout.

However, when I put any couts in the app and run it from a command
prompt I get no output at all :-(

Also tried ( in desperation ) printf and fprintf(stdout....) but got
nowt.

Is stdout redirected away from the commanding window.

Any ideas anybody.

OK, it's still dialog based but I want some output back at the command
prompt.

Thanks in advance

Paul.
Jul 22 '05 #1
2 1827
On 7 Feb 2004 07:30:52 -0800, pa***@fsmail.net (HoHum) wrote:
I have an MFC app with a simple dialog but I want to now not
instantiate the dialog but still let the remainder of the exe run to
completion and print the results to standard out ( just as a Win32
console app does ) in the good old Hello World example using cout.

However, when I put any couts in the app and run it from a command
prompt I get no output at all :-(

Also tried ( in desperation ) printf and fprintf(stdout....) but got
nowt.

Is stdout redirected away from the commanding window.

Any ideas anybody.

OK, it's still dialog based but I want some output back at the command
prompt.


If you re-post this question in [comp.os.ms-windows.programmer.win32],
which is an appropriate group, I'll give the simple non-C++-related answer.

Jul 22 '05 #2
On 7 Feb 2004 07:30:52 -0800 in comp.lang.c++, pa***@fsmail.net (HoHum)
was alleged to have written:
I have an MFC app with a simple dialog but I want to now not
instantiate the dialog but still let the remainder of the exe run to
completion and print the results to standard out ( just as a Win32
console app does ) in the good old Hello World example using cout.

However, when I put any couts in the app and run it from a command
prompt I get no output at all :-(


Try creating a short simple example of what you are trying to do with NO
off-topic code left in it <see http://www.slack.net/~shiva/welcome.txt>
that demonstrates the problem. That is, get rid of all the MFC dialog
parts from it. Then post it here and maybe somebody can help you with
it.

Jul 22 '05 #3

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

Similar topics

6
by: Tsai Li Ming | last post by:
Dear all, I have a problem with a redirecting stdout and stderr. I am a top level module and has no control over the imported modules that are making system calls such as os.system or popen2.* ....
4
by: Wes S. | last post by:
How can I redirect and tag sys.stdout values. I tried creating a class module that saved the old stdout and replaced it, but I can't seem to figure out how to do such. Here is what I got... ...
4
by: Leon | last post by:
"stdout" is file object, it open mode is "w" and it have a close() fuction..... while it run close(), how to reopen it because I want to do rewrite it stdout content update
7
by: Mike | last post by:
I would like my 'print' statements to send its output to the user's screen and a log file. This is my initial attempt: class StdoutLog(file): def __init__(self, stdout,...
10
by: Michael Gaab | last post by:
If I redirect stdout by using freopen("afile", "w", stdout); and then I closed stdout using, fclose(stdout), essentially I am just closing "afile". I have to reestablish what stdout originally...
9
by: Santtu Nyrhinen | last post by:
Hi, Let say that I have a function like void writeHello() { printf("Hello"); } Now I need to make an automated test fot that function. The test function returns 1 for successful and 0 for...
2
by: Greg Ercolano | last post by:
When I use os.popen(cmd,'w'), I find that under windows, the stdout of the child process disappears, instead of appearing in the DOS window the script is invoked from. eg: C:\type foo.py import...
5
by: =?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7z | last post by:
I wanna print the log to both the screen and file, so I simulatered a 'tee' class Tee(file): def __init__(self, name, mode): file.__init__(self, name, mode) self.stdout = sys.stdout...
4
by: hg | last post by:
Hi, I have the following ********************* C extention - redir.c #include "Python.h" PyObject * test_redir_test(PyObject *self) {
5
by: Joakim Hove | last post by:
Hello, I have written a program in C; this programs uses an external proprietary library. When calling a certain function in the external library, the particular function writes a message to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.