473,396 Members | 1,895 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.

Little C++ Help

Well im making a program and i think its possible to do what im trying to do but if i come across any more bumps in the road ill ask them then. So for right now i would like to no how to open a program in my program from the same window and to stay in the same window and to be editable not just viewable. Like i no how to open another window using

{

system("START FILENAME.EXE");

}


but i need to know how to keep it in the same window.

Umm i had some other questions but my mind is blank right now. Ty for the help. ill post when i think of the others. AGAIN TY.
Nov 27 '07 #1
5 1341
oler1s
671 Expert 512MB
Start the other program and pipe the output of that program to your program's output.
Nov 27 '07 #2
I dont understand can u plz explain.. i want my c++ program to open it but stay in same window.
Nov 27 '07 #3
oler1s
671 Expert 512MB
I dont understand can u plz explain.. i want my c++ program to open it but stay in same window.
Consider this. Where does the C++ program output go? In a console program, that means that each program has its own console. The console is an interface that allows someone to type in it (input), and read from it (output). There’s a bunch of startup code that will automatically setup your program with a console, and connect the output and input appropriately.

When you run another program, it too will get its own console, and be connected to that console’s output and input. “Stay in the same window” is a nebulous concept. It actually doesn’t make sense, as you have two separate programs, and so two separate consoles. What you probably mean is you want to see the output of that second program in your calling program.
You can’t use the system function for this. You can read about it on Google, but suffice to say, it’s a crude way of getting the OS to run something on the command line.

You’ll have to look into Windows API specific functions for opening a program, and then for piping that program’s output to your console window.
If you aren’t at the level of C++ that you can handle reading WinAPI documentation, then what you’re trying to do is far too complicated for you right now.
Nov 27 '07 #4
sicarie
4,677 Expert Mod 4TB
Well im making a program and i think its possible to do what im trying to do but if i come across any more bumps in the road ill ask them then. So for right now i would like to no how to open a program in my program from the same window and to stay in the same window and to be editable not just viewable.
Are you just trying to modify the file? What are you attempting to do?
Nov 27 '07 #5
thank you oler1s. You have answered my question. i guess i just asked it wrong. that is what i'm trying to do. I want to load the console from my program and still be allowed to input and see its output. So i guess i'm going to go read up on Windows API system functions. And sicarie i'm just trying to load the console (exe file) and still be able to input and see its output. Thanks Again.
Nov 28 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Ron Stephens | last post by:
I posted to my web site a fun little program called merlin.py today. Please keep in mind that I am a hobbyist and this is just a little hack, if you look at the code you will see that it is still...
2
by: hicham | last post by:
Hi, I am looking for help, i would like to know how can i use the endian.h and config.h to convert compiled files under solaris from BIG-ENDIAN to compiled files LITTLE-ENDIAN. I am working...
2
by: OZ | last post by:
Hi, I am new C++ and need a little help with a public domain program that is suppose to perform a byte swap. I am receiving the following error messages during the compile process with Microsoft...
2
by: | last post by:
Hi, Im kindof new to c++... need a little help with system() function.. I use system to execute a dos program... but i want the rest of the program to continue imediately after executing it. and...
3
by: Erik Thorsen | last post by:
Hello! I am in the process of creating a database listing tours, something similar to what you can find on www.infohub.com. This means that I need to create a database which can be searchable...
8
by: Perception | last post by:
Hello all, If I have a C-like data structure such that struct Data { int a; //16-bit value char; //3 ASCII characters int b; //32-bit value int c; //24-bit value }
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
14
by: Brett Sinclair | last post by:
Hello everybody I'm still on the learning curve here...and from what I read, I created inherited datagrid class so I could have icons, combobox...etc in the columns of my datagrid. The grid...
16
by: Durumdara | last post by:
Hi ! I have a problem. I have a little tool that can get data about filesystems and wrote it in python. The main user asked me a GUI for this software. This user is needed a portable...
0
by: nintesa | last post by:
Hello from Italy! I'm trying to create a little script (php/mysql/javascript) to record visits of some of my sites. I have sites www.a.com, www.b.com ecc... and I have my counter script on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.