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 times and it only prints the first iteration.
I used cout.flush() after each cout line, it also didn't work.
it iterates no more than 20 times and it only prints the first iteration.
How do you know how many times it iterates?
I would run the code in a debugger to see how many items are in the container dist
(or you could add code to print the number).
Hello,
I'm trying to print the value of my cursor in the dbms_output.put_line in shell script, but it only shows "PL/SQL procedure successfully completed." nothing else. I have set serveroutput on,
Below is my script : Any advise would be really helpful.
sqlplus -s $ORACLE_LOGON <<EOF >>... (2 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)
Heyas
Me trying some C.. cout in specific, thats what i remembered:
#include <stdio.h>
// -- Just the above or with all the below ones, no change
#include <stdio_ext.h>
#include <stdlib.h>
#include <wchar.h>
//#include <iostream> // I assume its the same anyway?
//#include <iostream.h>... (2 Replies)
Hi Gurus,
I have below sample script. I expect it print error when running script without input parameter. but the it doesn't.
would you please help me about this issue.
thanks in advance.
/script$cat test.ksh
#!/bin/ksh
while getopts :f: arg
do
case $arg in
... (4 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)
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)
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)