Sponsored Content
Top Forums Programming std::cout and gfortran print*, don't output to the screen Post 302509333 by LMHmedchem on Wednesday 30th of March 2011 02:28:41 PM
Old 03-30-2011
Well I found it, Smilie
Code:
#ifdef RELEASEVERSION
   freopen( "/dev/null", "w", stdout);
   freopen( "/dev/null", "w", stderr);
#endif

I didn't think that RELEASEVERSION was defined in the make, but commenting this out fixes the issue, so it must be. This is a sensible code addtition, since if there is an error, the child is supposed to report that back to the parent as an error code, not send it to a terminal, which may or may not exist.

I realize that this was a difficult fix without the src available, so I really appreciate all of your effort in helping me to get it sorted out.

I wish I was a good enough programmer to contribute in the same way. I do look for posts that I think I can answer, but most of the ones I find have already been attended to. I am reluctant to give advice that may be incorrect. I give allot of hardware adivce on some other forums, which is something I feel much more competent about, so I hope that I am making an overall contribution the the online world.

Thanks again,

LMHmedchem

---------- Post updated at 02:28 PM ---------- Previous update was at 02:24 PM ----------

Is there a way to mark the thread as solved, or don't they do that here?
This User Gave Thanks to LMHmedchem For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to redirect std out and std err to same file

Hi I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this. Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies

2. Programming

Why I don't get any output?

Hello, I am very new in writing low level programming in C. I am trying to get an output in Linux 2.6.17.6 gentoo platform, but I don't get any output. I am trying to do the following: I am trying to scan a word and print its content at the standard output by using sscanf and printf. I... (6 Replies)
Discussion started by: Sharmin
6 Replies

3. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

4. Shell Programming and Scripting

awk to compare lines of two files and print output on screen

hey guys, I have two files both with two columns, I have already created an awk code to ignore certain lines (e.g lines that start with 963) as they wou ld begin with a certain string, however, the rest I have added together and calculated the average. At the moment the code also displays... (3 Replies)
Discussion started by: chlfc
3 Replies

5. UNIX for Dummies Questions & Answers

cout doesn't print everything

Hi all, I implemented a C++ program and successfully compiled and ran on my laptop. However when I copy my code to another machine (school's sun machine), it didn't run properly. I can compile and run, but cout does not print everything. I used cout in a loop where it iterates no more than 20... (5 Replies)
Discussion started by: SaTYR
5 Replies

6. AIX

Redirecting Both to a file and std output

Hello Friends, Can some one help me how to redirect output of a file to both a file and std output? All the help would be greatly appreciated. Regards Sridhar (1 Reply)
Discussion started by: send2sridhar
1 Replies

7. UNIX for Advanced & Expert Users

redirect to both file and std output at the same time

hello can some one please help me to redirect the output of a command to both std output and a file. this is little urgent. sridhar (2 Replies)
Discussion started by: send2sridhar
2 Replies

8. UNIX for Dummies Questions & Answers

how to print script output to screen and file

Hi all, I have a script that bulk loads thousands of lines of data. I need to log the output during the execution of the script. I know I can redirect (">") the output to a file; however, I want the output going to both the screen and the log file. I thought I could use pipe to pipe the... (10 Replies)
Discussion started by: orahi001
10 Replies

9. Solaris

Camouflage STD IN on output (TRU64)

Hi guys, i have a new problem, even in scripting on KSH. Given a string by standard INPUT (keyboard), i need to replace each character i print with this one '#' . It's to camouflage password while digiting on command line. For example: ---------------------------------- prompt$ ... (3 Replies)
Discussion started by: D4vid
3 Replies

10. UNIX for Dummies Questions & Answers

awk: don't print sub-arrays

Hi ! I have this input: 12{11}{11110}{80}3456 {123}15{60}9876{8083}34 I try to work on individual numbers between braces. 3 possible cases (here I used colours to be clearer only): - there is no "0" among the characters between braces: so we don't touch anything. - there is a "0" among... (4 Replies)
Discussion started by: beca123456
4 Replies
FBB::Hostname(3bobcat)						     Host Info						    FBB::Hostname(3bobcat)

NAME
FBB::Hostname - Contains name/address info about a host SYNOPSIS
#include <bobcat/hostname> Linking option: -lbobcat DESCRIPTION
FBB::Hostname objects inherit from Hostent, and offers information about a host, like Hostent. Apart from being initialized by a hostname or host address, they can also be initialized by a FBB::InetAddress object. Most of the functionality of an FBB::Hostname object is avail- able through its parent-class FBB::Hostent. NAMESPACE
FBB All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB. INHERITS FROM
FBB::Hostent CONSTRUCTORS
o Hostname(): The default constructor initializes an empty FBB::Hostname object. o Hostname((std::string const &host)): This constructor initializes an FBB::Hostname object from a string representing the name or dotted decimal address of a host. An FBB::Errno object is thrown if the hostname information could not be retrieved. o Hostname(InetAddress const &inetAddress): This constructor initializes an FBB::Hostname object from an InetAddress object. An FBB::Errno object is thrown if the hostname information could not be retrieved. The copy constructor is available. MEMBER FUNCTIONS
All members of FBB::Hostent are available, as FBB::Hostname inherits from this class. There are no additional members. EXAMPLE
#include <iostream> #include <bobcat/hostname> #include <bobcat/errno> using namespace std; using namespace FBB; int main(int argc, char **argv) { while (true) { cout << "Enter name or address: "; string str; if (!getline(cin, str)) return 0; if (str == "") break; try { Hostname h(str); cout << "Official name: "; cout << h.hostname() << endl; cout << "Aliases: "; for (size_t idx = 0; idx < h.nAliases(); idx++) cout << h.alias(idx) << " "; cout << endl; cout << "Adresses: "; for (size_t idx = 0; idx < h.nAddresses(); idx++) cout << h.dottedDecimalAddress(idx) << " "; cout << endl; } catch (Errno const &err) { cout << err.why() << endl; } } return 0; } FILES
bobcat/hostname - defines the class interface SEE ALSO
bobcat(7), hostent(3bobcat) BUGS
None Reported. DISTRIBUTION FILES
o bobcat_3.01.00-x.dsc: detached signature; o bobcat_3.01.00-x.tar.gz: source archive; o bobcat_3.01.00-x_i386.changes: change log; o libbobcat1_3.01.00-x_*.deb: debian package holding the libraries; o libbobcat1-dev_3.01.00-x_*.deb: debian package holding the libraries, headers and manual pages; o http://sourceforge.net/projects/bobcat: public archive location; BOBCAT
Bobcat is an acronym of `Brokken's Own Base Classes And Templates'. COPYRIGHT
This is free software, distributed under the terms of the GNU General Public License (GPL). AUTHOR
Frank B. Brokken (f.b.brokken@rug.nl). libbobcat1-dev_3.01.00-x.tar.gz 2005-2012 FBB::Hostname(3bobcat)
All times are GMT -4. The time now is 09:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy