I have the following portion of a script
Check()
{
echo "\n\nChecking that all constraints are Enabled"
echo "..."
sleep 2
CHECK_COUNT='sqlplus -s $1 <<-EOSQL4
set feed off pause off pages 0 head off;
set linesize 150 echo off;
select count(*) from user_constraints where... (4 Replies)
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)
Hi I am running Ubuntu 9.10 and I use QtCreator for my C++ Programms.
I knwo that in wondows OS cout is located in iostream.h library.
It seems that it isn;t the same library in Qtcrator... :(
Anyway, iostream.h doesn't exist and iostream (without the .h) exists but doesn't seem to include the... (4 Replies)
Hello,
Compilation of the line "cout = outFile" throws error
"Error: std::ios_base::operator=(const std::ios_base&) is not accessible from std::ios ::operator=(const std::ios &)."
outFile is declared as "static ofstream".
Thanks,
Shafi (3 Replies)
I am not sure where to post this other than here.
I am trying to figure out why an app gives different output when compiled under Ubuntu 10.10 and CentOS 5.5. I am pretty sure that the issue is that the Cent version has gcc 4.1 installed, while Ubuntu has gcc 4.4. I am trying to print from some... (20 Replies)
Hi,
I am getting this error while running the following code.
i=`awk '{print $2}' test1.txt`
j=`awk '{print $4}' test1.txt`
k=`awk '{print $6}' test1.txt`
if ; then
echo "Up."
else
echo "down"
fi
rm -f test.txt test1.txt
error is this:
line 12: '
Please suggest. (2 Replies)
Hello,
This is a programming question as well as a suse question, so let me know if you think I should post this in programming.
I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following:
sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm
Loaded plugins: fastestmirror
Setting up Local Package... (13 Replies)
I'm trying to print out integers and space/newline for a nicer output, for example, every 20 integers in a row with ternary operator.
In C I could do it with:printf("%d%s",tmp_int, ((j+1)%20) ? "\t":"\n"); but could not figure out the equivalent in C++:
cout << ((j+1)%20)?... (4 Replies)
Discussion started by: yifangt
4 Replies
LEARN ABOUT DEBIAN
onekey
FBB::OneKey(3bobcat) One keystroke input FBB::OneKey(3bobcat)NAME
FBB::OneKey - Single keystroke input, not requiring `Return'
SYNOPSIS
#include <bobcat/onekey>
Linking option: -lbobcat
DESCRIPTION
OneKey objects may be used to realize `direct keyboard input': a pressed key becomes available without the need for pressing Enter. The
characters are obtained from the standard input stream. Direct key entry remains in effect for as long as the OneKey object exists. Once
the object is destroyed the standard input stream will return to its default mode of operation, in which input is `confirmed' by a newline
character.
NAMESPACE
FBB
All constructors, members, operators and manipulators, mentioned in this man-page, are defined in the namespace FBB.
INHERITS FROM -
ENUMERATION
The OneKey::Mode enumeration is used to control echoing of returned characters. It has two values:
o OFF: returned characters are not echoed to the standard output stream;
o ON: returned characters are echoed to the standard output stream.
CONSTRUCTORS
o OneKey(OneKey::Mode state = OneKey::OFF):
This constructor initializes the OneKey input object. By default, entered characters are not echoed. By constructing the object with
the OneKey::ON argument, entered characters are echoed to the standard output stream.
This construct throws an Errno exception if it not properly complete. The constructor may fail for the following reasons:
o the standard input stream is not a tty (e.g., when the standard input stream is redirected to a file);
o the current state of the standard input stream can't be determined;
o the standard input stream's state can't be changed to the `direct keyboard input' mode. The copy constructor (and the overloaded
assignement operator) are not available.
MEMBER FUNCTIONS
o int get() const:
Returns the next character from the standard input stream, without the need for pressing Enter.
o void setEcho(OneKey::Mode state):
Changes the echo-state of the OneKey object. The argument may be either OneKey::ON or OneKey::OFF.
o void verify() const:
Obsoleted, will be removed in a future Bobcat release.
EXAMPLE
/*
driver.cc
*/
#include <iostream>
#include <string>
#include <bobcat/onekey>
using namespace std;
using namespace FBB;
int main()
{
try
{
OneKey onekey;
onekey.verify();
cout << "Usage: 1: next chars are echoed, 0: no echo, q: quits
";
while (true)
{
char c;
cout << "ready...
";
cout << "Got character '" << (c = onekey.get()) << "'
";
switch (c)
{
case '1':
onekey.setEcho(OneKey::ON);
break;
case '0':
onekey.setEcho(OneKey::OFF);
break;
case 'q':
return 0;
}
}
}
catch (Errno const &e)
{
cout << e.why() << endl;
return e.which();
}
}
FILES
bobcat/onekey - defines the class interface
SEE ALSO bobcat(7)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::OneKey(3bobcat)