C# :: Closing MDI Children Closes Main App?

Mar 14, 2014

The following not only closes the MDI children, but also the form I set to be an MDI container.

private void close()
{
Form[] childArray = this.MdiChildren;
foreach (Form childForm in childArray)
{
childForm.Hide();
}
}

View 5 Replies


ADVERTISEMENT

C++ ::  Can't Delete Tree Node Without Children

Nov 14, 2014

It seems that I can't delete a node without children....

#define TRUE 1
#define FALSE 1
typedef struct binary_tree_nodes_t {
struct binary_tree_nodes_t* right;
struct binary_tree_nodes_t* left;

[Code] ....

Should my search_node function return this : binary_tree_nodes**

So I can get the address of pointer , is this causing my problem ?

View 8 Replies View Related

C++ :: Delete A Node (With No Children) In Binary

Dec 23, 2013

I am trying to delete a node(has no children). for some reason, it keeps giving me an error.

void AVLtree<T>::remove(const T& item) {
node* curr = root;
node* prev = nullptr;
node* next = nullptr;
if(curr == nullptr)

[Code] .....

the error is: Access violation reading location 0xfeeefeee.

View 2 Replies View Related

C++ :: IDE Closes When Alt F9 Or Ctrl F5?

Sep 11, 2014

I've recently downloaded c++ ide for windows 8(dos boxed version).

Every time i try to compile or run any program. It simply closes down?

View 2 Replies View Related

C++ :: CMD Closes After User Input

Jun 7, 2014

I'm trying to make a simple program that accepts user input, simple stuff. When the user (me) enters a number to be sent to the console and i press enter so it accepts the data, it closes the command prompt and thus ending the program. I just need to find a key that i can use to continue but doesn't close cmd.

View 5 Replies View Related

C/C++ :: Infinite For Loop - Program Just Closes

Feb 10, 2015

So I learned how to make a basic for loop and I decided to try my best to make an infinite one. Every time I run it, it doesn't say anything and just closes. Visual Studio doesn't say there's anything wrong with my code.

Here's the code

#include <iostream>
#include <conio.h>
using namespace std;
int main () {
int d = 9;
for(int k = 10; k < d; k = k +1) {
cout << "For loop value = " << k << endl;
getch();
} }

View 4 Replies View Related

C/C++ :: Program Closes When Using Any Number In Switch

Feb 17, 2015

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

[Code]....

when running the program it closses after the switch.

View 2 Replies View Related

C/C++ :: SDL Window Auto-Closes When Image Changes

Jan 22, 2014

Background: I'm making a small game using CodeBlocks and SDL. All of the code resides in a class named Game - the only thing running in Main is the creation of the Game object and the class function execute(). So far, I've made a Start Menu with three clickable buttons. I'm in the midst of making one of the buttons - Load Game - change the game screen to the Load Game menu. Basically, when the user clicks the button, the image on screen changes according to the button they click.

Issue: After successfully making the Load Game button change the image on the screen, I found that the SDL window mysteriously closes out several seconds after the image change. What is causing this - the window stays on perfectly fine until the background image is changed and the only way to break the loop is for the player to click the x on the window. I've gone over the code several times and haven't found anything that might be the cause.

Code:

Game.h file
#ifndef GAME_H
#define GAME_H
#include "SDL/SDL.h"
#include "SDL/SDL_ttf.h"
#include <iostream>
#include <cstdlib>

[Code] ....

Output:
- Window with an Start Menu image and a button with the words "Load Game".
- If user clicks the X on the window, the window closes.
- If user clicks "Load Game" button, Start Menu image changes to Load Game image. After about seven seconds, the window automatically closes out. This isn't supposed to happen.

View 5 Replies View Related

C++ :: CMD From Execute Closing Instantly

Aug 13, 2014

I compiled/built a code I had and made an executed file but when i click on it the CMD closes instantly. Is there anyway to keep this open?

View 10 Replies View Related

C++ :: Program Compiles / Runs But Closes Right Away When Finished

Oct 15, 2013

Program compiles and runs no problem but closes right away when finished.

Heres the code:
Code: #include <iostream>
#include <cmath>
using namespace std;
double calcDistance(double,double, double, double);
float calcKilometers(float, const float) ;

[Code] ....

View 3 Replies View Related

C++ :: Execute Function If User Closes Console

Feb 17, 2013

I would like to implements something in my code that clears the value of my variables when the user closes the console. How to do that or the program clears the values automatically?

View 3 Replies View Related

C++ :: OpenCV - Opening And Closing Webcam

Jan 24, 2015

I am trying to switch between 2 states, and the event that determines which state i am in is based on the key i've pressed. So in this case i want the webcam to start automatically, and when key is pressed it then turns it off. The way I've done it is like this :

bool webcam_on() {
int c = 0;
VideoCapture cap(0);
if ( !cap.isOpened() ) // if not success, exit program

[Code] .....

The problem with this method is that cin.get() blocks the video stream.. I wanted something that the webcam turned on until i press some key, which would trigger the release.. How can this be done?

View 7 Replies View Related

C/C++ :: How To Keep Console From Closing When Executing Code

Mar 4, 2015

I tried.

cin.get();
and
return 0;

is there a better way to keep the user info displaying without closing the console window.

View 1 Replies View Related

C++ :: Termination Of Namespaces With A Closing Brace Only

Jan 9, 2014

... and not with a brace followed by a semicolon like in class-definitions - reason for that?

View 2 Replies View Related

C++ :: Calculate Wages For Employees - Loop Closes Before Finishing

Dec 11, 2013

I'm writing a code that's suppose to do a payroll for my intro cs class. At first it was working fine until I had to add the part that made sure a user couldn't enter a wage value below $6.00 and now it stops the loop right after that part for some reason.

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
int const HR = 7;

[Code] ....

View 2 Replies View Related

C# :: Editing A Parent Dialog Box Without Closing The Child

Sep 30, 2014

I'm using windows forms and I have a parent dialog box that consists of a text box and a drop-down that launches a child dialog box. The child takes user input and then prints dialog to the text box in the parent. However, the output does not appear in the text box until I close the child.

Now my question is, how do I get the text to appear without closing the child? I hit a button to send the info to the text box, but it still doesn't appear until the child closes. I also need to set up a button to suspend the child so that the user can click/copy/etc the parent.

View 7 Replies View Related

Visual C++ :: Closing MFC Application From Command Prompt

Jul 31, 2013

I have created a MFC dialog based application. Now I want to implement such a functionailty that I will be closing my application through command prompt. And while closing of my application the ExitInstance() method of my application should get called. What is the command which I should put in the command prompt to close my application in such a way.

View 8 Replies View Related

C++ :: Program To Determine Number Of Inputted Riders And Closes When Input Is -1?

Jan 16, 2015

I seem to be having a logical error but can not find the sources.

#include <iostream>
using namespace std;
int main() {
int student = 0;
int adult = 0;

[Code] ....

View 1 Replies View Related

C :: How To Prevent A User From Closing Output Screen During Execution

Sep 17, 2013

I created a C program that extracts some information from computer and displays it on screen. It is completed today and is going to be applied to startup programs of domain machines. It runs at logon and takes somewhat 5-10 seconds to finish execution. The output is shown on console screen & user can either close the window by clicking on 'x' or pressing 'Ctrl+c' during execution. How do i prevent both of these events?

Basically the most time consuming processes are

Code: popen("systeminfo","r");
popen("wmic qfe get installedon","r");

1st command is getting OS name,version and hotfixes installed.
2nd command gives me the date of updates installed.

I then filter out data & print required information only.

View 3 Replies View Related

C# :: StreamWriter / View Written Data Prior To Closing?

Oct 11, 2014

I've found that with streamwriter(sw) the data isn't displayed with the written to document until you either leave scope or use sw.close I'd prefer to keep sw open as I will be writing to the file in and out, sometimes very frequently, but would also prefer the data to be viewed in real time. Is there an efficient way of going about this?

View 12 Replies View Related

C++ :: FIFO Reads Endlessly After Closing It On Producer Side

May 10, 2012

Right after I close FIFO on the producer side, the app on the consumer side gets into an endless loop. select() returns that FIFO is ready to read. Below is the excerpt from the consumer code. The FIFO is opened "blocking" on both ends.

Code:

FifoClass fifo_r = FifoClass("/tmp/FIFO_READ");
int fdr = fifo_r.OpenR();// this->fd = open(name.c_str(), O_RDONLY , 0);
for(int i=0; ;i++) {
FD_ZERO(&rset);
FD_SET(fdr, &rset);

[Code] .....

View 2 Replies View Related

C :: Redirecting Multiple Pipes With Multiple Children

Mar 21, 2014

I've been working on a function that works like a pipeline of a shell but receives a directory, go over it an search for every file to send it to a filter, something like this in bash "cat dir/* | cmd_1 | cmd_2 | ... | cmd_N", The only problem i have with the code is the redirection of the pipe descriptors.

Code:

int main(int argc, char* argv[]){
char** cmd;
int Number_cmd;
cmd = &(argv[2]); /*list of cmds*/
Number_cmd = argc-2; /*number of cmds*/
}

[code]....

The code is seems to work fine except when i run it with more than one command in example ("./filter DIR wc rev") in this case it returns

wc: standard input: Bad file descriptor
wc: -: Bad file descriptor
0 0 0

View 2 Replies View Related

Visual C++ :: ActiveX Web Browser Control Not Deleting Session Cookies Even After Closing

Aug 9, 2013

I have an C++ application which uses Microsoft Web browser ActiveX control to launch any URL within the application. The browser is embedded in C++ form and It's working fine with all the feature Microsoft has exposed through Interface(IID_IWebBrowser2).But while any url that is using session cookie has been launched, even after closing the browser the session cookies are not getting deleted. For example if user login info is stored as session cookies,the url is using the cookies and getting launched without asking for user log in info.

But if I close the browser, and again relaunch , the cookies should be deleted and the url will not find the cookies to be used for log in . That is not happening here. Although this is session cookies , it's not getting deleted and being used by embedded browser. However, if the url is launched in IE, it is behaving as expected.

So, Do I need to delete the cookies explicitly? If Yes, How to do that?

View 2 Replies View Related

C :: Difference Between Two Int Main Functions

Feb 6, 2014

I just wanted to know what's the difference between these two types of main functions:

Code: int main (int argc, char** argv){ ... }

Code: int main (int argc, char* argv[]){ ... }

View 4 Replies View Related

C :: How To Print The String In Main

May 23, 2013

if you have something like this how can you print the string in main??

Code:

/#include <stdio.h>
#include <stdlib.h>
void myf(char *p)
{
p="balls";
}
int main()
{

[Code]...

View 2 Replies View Related

C :: Passing Arguments To Main

Feb 10, 2015

I have a 1wire program from maxim running in visual studio. There is this argument in the main function that requires the com port to be specified the command line. If I do pass it as "COM1" the program works as expected.

I don't want to depend on having to pass "COM1" in the command line and into main. I've tried creating a string for COM1 and passing it right into the if function but it doesn't work.

Code:
int main(int argc, char **argv) {
int len, addr, page, answer, i;
int done = FALSE;
SMALLINT bank = 1;
uchar data[552];

[Code] .....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved