Sponsored Content
Full Discussion: system("PAUSE") Problem.....
Top Forums Programming system("PAUSE") Problem..... Post 7913 by mbolthouse on Wednesday 3rd of October 2001 11:54:16 AM
Old 10-03-2001
system("PAUSE") Problem.....

Ok, here's the situation....I have this code...

#include <iostream.h>
#include <stdlib.h>

int main()
{
cout << "\nBlah, and Blah\n\n";

system("PAUSE");

return 0;
}

Now, "system("PAUSE")" gets executed before "cout" does, and I have absolutely no idea why, so when I type this in instead...

#include <stdio.h>
#include <stdlib.h>

int main()
{
printf ("\nBlah, and Blah\n\n");

system("PAUSE");

return 0;

}

...it works just fine....it's like printf has precidence over cout, which I need to fix. So, does anyone know another way for a PAUSE using cout, and does anyone have anymore information on why this situation occurs? Thanks!

Mike
 

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or question of my own) is: Oracle tns listener, "CT_LISTENER", and the enterprise manager (EM) of the instance, which is uniq instance and called... (0 Replies)
Discussion started by: talipk
0 Replies

2. UNIX for Advanced & Expert Users

A question/problem about oracle "tns listener" and "enterprise manager"

hi, I have a problem about the Oracle related components. I'm not able to find any answer yet, and waiting for your responses... Here is the configuration of my system: * an IBM P550 machine, * an AIX 5.3 running on it and * an oracle database, already installed on it. The problem (or... (1 Reply)
Discussion started by: talipk
1 Replies

3. Programming

Problem with socket binding - "system" call

Hi, I am having an issue with using sockets. I have a program which binds to a socket and listen on it. Later I spawn a thread to handle some function. In the new thread created I need to call a shell script which executes the specified function. Here I am using a system command to call the... (5 Replies)
Discussion started by: Janardhanbr
5 Replies

4. Programming

Problem with system("command")

Sorry, I don't speak English very well but I will try to explain my problem! If I write a C++ program and I use che system call system("command") I have this problem: If I would launch a program I do this: system("~/Agostino/program/test") and all work fine!! But if I divide this... (9 Replies)
Discussion started by: acciues
9 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Problem using "system" command in perl

Hello!!! I'm trying to pass the output from bash command to perl variable in a perl script, and I used the "system" command to execute the bash statment and pass the result to perl string variable, in this perl script I used a variable $file that store data for using it as a regular expression.... (2 Replies)
Discussion started by: evolabo
2 Replies

7. AIX

[Tip] Problem with rpm ("different operating system")

I have once experienced this problem without understanding what caused it but now learned thatn there is even a PMR dealing with it. Sometimes it happens that you encounter the following (rather cryptical) error message when trying to install an rpm-package: package <rpm_package_name> is for a... (1 Reply)
Discussion started by: bakunin
1 Replies

8. Shell Programming and Scripting

awk "date" and "system" command

Hello experts! I need your help please I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.: 2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well. So I want to execute date -d '2016-11-25 03:14:50' ... (2 Replies)
Discussion started by: phaethon
2 Replies

9. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

10. UNIX for Beginners Questions & Answers

What does "force devmap reload" as in "multipath -r" means for my system and stability of my system?

Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information. Any info would be appreciated! Also some links to the documentation on this specific issue could help a... (1 Reply)
Discussion started by: jsteppe
1 Replies
TAU_GET_FUNC_VALS(3)					      TAU Instrumentation API					      TAU_GET_FUNC_VALS(3)

NAME
TAU_GET_FUNC_VALS - Gets detailed performance data for given functions SYNOPSIS
C/C++: TAU_GET_FUNC_VALS(const char **inFuncs, int numOfFuncs, double ***counterExclusiveValues, double ***counterInclusiveValues, int **numOfCalls, int **numOfSubRoutines, const char ***counterNames, int *numOfCounters, int tid); DESCRIPTION
It gets detailed performance data for the list of routines. The user specifies inFuncs and the number of routines; TAU then returns the other arguments with the performance data. counterExclusiveValues and counterInclusiveValues are two dimensional arrays: the first dimension is the routine id and the second is counter id. The value is indexed by these two dimensions. numCalls and numSubrs (or child routines) are one dimensional arrays. EXAMPLE
C/C++ : const char **inFuncs; /* The first dimension is functions, and the second dimension is counters */ double **counterExclusiveValues; double **counterInclusiveValues; int *numOfCalls; int *numOfSubRoutines; const char **counterNames; int numOfCouns; TAU_GET_FUNC_NAMES(functionList, numOfFunctions); /* We are only interested in the first two routines that are executing in this context. So, we allocate space for two routine names and get the performance data for these two routines at runtime. */ if (numOfFunctions >=2 ) { inFuncs = (const char **) malloc(sizeof(const char *) * 2); inFuncs[0] = functionList[0]; inFuncs[1] = functionList[1]; //Just to show consistency. TAU_DB_DUMP(); TAU_GET_FUNC_VALS(inFuncs, 2, counterExclusiveValues, counterInclusiveValues, numOfCalls, numOfSubRoutines, counterNames, numOfCouns); TAU_DUMP_FUNC_VALS_INCR(inFuncs, 2); cout << "@@@@@@@@@@@@@@@" << endl; cout << "The number of counters is: " << numOfCouns << endl; cout << "The first counter is: " << counterNames[0] << endl; cout << "The Exclusive value of: " << inFuncs[0] << " is: " << counterExclusiveValues[0][0] << endl; cout << "The numOfSubRoutines of: " << inFuncs[0] << " is: " << numOfSubRoutines[0] << endl; cout << "The Inclusive value of: " << inFuncs[1] << " is: " << counterInclusiveValues[1][0] << endl; cout << "The numOfCalls of: " << inFuncs[1] << " is: " << numOfCalls[1] << endl; cout << "@@@@@@@@@@@@@@@" << endl; } TAU_DB_DUMP_INCR(); SEE ALSO
TAU_GET_COUNTER_NAMES(3), TAU_GET_FUNC_NAMES(3), TAU_DUMP_FUNC_NAMES(3), TAU_DUMP_FUNC_VALS(3) 08/31/2005 TAU_GET_FUNC_VALS(3)
All times are GMT -4. The time now is 09:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy