473,387 Members | 1,942 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,387 software developers and data experts.

How to move the control to DOS after the program execution?

hi guyz,

My program produces output on the DOS window and an in an excel sheet. the input for my program is a set os images mentioned in a text file. it produces a set of values for each image. after running on all the images and obtaining the results,i need to press CTRL+c to kill it so that i can write a new command on command line.

My main pgm is as shown below...it uses another function multipledot. the printing of values in DOS window is a part of multipledot function. I want the control back to the DOS once the program is executed.
Expand|Select|Wrap|Line Numbers
  1. int main()
  2. {
  3.  
  4.     int a,b;
  5.         cout << "Enter threshold value between 0 and 255 : ";
  6.                cin >> a;
  7.     cout << "Enter window size : ";
  8.                  cin >> b;    
  9.     std::string tempStr;
  10.     std::vector<std::string> files;
  11.     std::fstream f,f1;
  12.     f1.open("files1.xls", std::ios::out | std::ios::app);
  13.     f1<<"Threshold"<<"\t"<<"Windowsize"<<"\t"<<"filename"<<"\t"<<"imagesize"<<"\t"<<"CentroidPoint.x"<<"\t"<<"CentroidPoint.y"<<std::endl;
  14.     f.open("files.txt", std::ios::in);    
  15.     if(!f.is_open())
  16.     {
  17.         /*Then cry*/
  18.         cout<<"Cry"<<endl;
  19.         return 0;
  20.     }
  21.     while(!f.eof())
  22.     {
  23.         f>>tempStr;
  24.         files.push_back(tempStr);
  25.     }
  26.     MultipleDotMain(files,b,a);
  27.     f.close();
  28.  
  29.     cin.get();
  30.     return 1;
  31. }
  32.  

thanks,
sanjeevani
Oct 2 '07 #1
1 1078
Maybe removing cin.get() ? :)
Oct 2 '07 #2

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

Similar topics

3
by: Lad | last post by:
In my program I use os.popen2('notepad.exe IDPass.txt') to open IDPass.txt file in Notepad window. Users can edit this file but the problem is that if the program runs on Windows 98 , the...
4
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab...
2
by: Reinier | last post by:
Hello Some years ago I wrote an application (a sequencer) in VB5 and then in VB6 which records and plays MIDI signals from and to an electronic organ. The MIDI information is displayed in a RichText...
10
by: Dennis D. | last post by:
Hello: There are a series of textboxes (x.text, y.text, z.text etc.) in which user input is expected. As: dtmX=CDate(x.text) dtmY=CDate(y.text) dtmZ=CDate(z.text) where x, y, and z.text...
4
by: Mark Gaeth | last post by:
Greetings, I was lucky one time to have someone provide me a little code that would allow the user to move a control at runtime. However, I lost that code snippet when my hard drive failed and...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
4
by: Raghu | last post by:
I have developed a web portal that uses ReportViewer web control to connect to a remote SQL 2005 Report server and displays the reports on the client side. The asp.net page has been coded to...
7
by: Buck Rogers | last post by:
Hi all! Newbie here. Below is an example from Teach Yourself C in 21 Days. My apologies if it is a bit long. What I don't understand is how the "get_data" function can call the...
2
by: sphinney | last post by:
Hi everyone. I have a form in my Access 2007 database with a Microsoft Office Document Imaging Viewer Control 12.0 object on it. The object is named "GRAPHIC_mdv". When the form opens I want to...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.