WolfPack 491 Posting Virtuoso Team Colleague
vector <char*> constArray(10);
	char* changingString = "hello";

	constArray[0] = new char;
	constArray[0] = changingString;
	changingString = "yadayada";

	printf("constArray[0] = %s\nchangingString = %s\n", constArray[0], changingString);
WolfPack 491 Posting Virtuoso Team Colleague

use the memset function.

WolfPack 491 Posting Virtuoso Team Colleague

Dont use same variable names. It makes it confusing to you and creates bugs that are very hard to find.

void findLowest(double grades[4][5], double average[4], double lowest[4])
{
	for (int x = 0; x < 4; x++)
	{
		
		double low;//declare a variable here to hold the lowest score
		low= grades[x][0];
		for(int y = 0; y < 5; y++)
		{
			 //makes the new variable equal to the first element in the row

			if (grades[x][y] < low)
			{
						
				low= grades[x][y]; //swaps the value of the new variable, if needed
			}
		}


	
			lowest[x] = low; // puts value of the lowest variable into the lowest[4] array
	
	}
}

Edit : Similar for the line where you use a variable called

average

.

WolfPack 491 Posting Virtuoso Team Colleague

I personally believe that following the Petzold Book ( I believe that is the book number one in your list ), is the best when starting GUI programming in Windows. So before starting on MFC you better go through that. Initially the Applications will look ugly, due to the use of system fonts, but later you will get the hang on how to improve them. I think it is essential you follow this book because you can get the concept of the message loop in windows. Once you get the hold of this, following the MFC Framework or other libraries will be easier. I have not used the VCL, but when I used MFC, the main problem was the meaning of Events and their Handler Functions. Since MFC does this automaticcaly for you, you dont get the basics of it, and when it come to changing the application even slightly you will have to rely on examples of previously done programs. Once you learn to do this directly using the Win32 API and the Platform SDK Documentation, you will be better off, even if you later transfer to MFC or other GUI Library.
One thing is, the Petzold book's examples are in C. But if your knowledge on C++ is good, I dont think you will find it difficult.
After trying this you can move into game programming in Windows. More advanced reading can be found in Programming Applications for Microsoft Windows by Jeffrey Richter.
And remember …

WolfPack 491 Posting Virtuoso Team Colleague

hmmm. It compiled with the Visual Studio 8 Compiler ( 2005 Beta ). Maybe you are using the wrong file extention ( remember it says in C ).
This was my command to compile

cl /EHsc main.c

edit: I checked without the /EHsc switch. that also works.

cl main.c
WolfPack 491 Posting Virtuoso Team Colleague

C/C++ : Write a function in different ways that will return f(7) = 4 and f(4) = 7

int f ( int x )
{
       if ( x == 7 )
      {
            return 4;
      }
      if ( x == 4 )
      {
            return 7;
      }
}

:cheesy:

WolfPack 491 Posting Virtuoso Team Colleague

Write a "Hello World" program in 'C' without using a semicolon.

#include <stdio.h>

int main()
{
	while( !printf( "%s", "Hello World\n" ) )
	{
	}
}
WolfPack 491 Posting Virtuoso Team Colleague
void initPlane(char plane[NUMROWS][NUMSEATS]);
// POSTCONDITION: 
//   plane[x][0] == 'A', 0<=x<=6
//   plane[x][1] == 'B', 0<=x<=6
//   plane[x][2] == 'C', 0<=x<=6
//   plane[x][3] == 'D', 0<=x<=6

void printPlane(char msg[], char plane[NUMROWS][NUMSEATS]);
// POSTCONDITION: The seating layout of the plane has been printed
// to the standard output with an X displayed for each taken seat.

void getSeat(char &row, char &seat);
// POSTCONDITION: 1 <= row <= 7, 'A' <= seat <= 'D'
// Note that getSeat does not check to see if the seat has been taken.

Where are the definitions for these function declarations?

WolfPack 491 Posting Virtuoso Team Colleague

while( str != ' ' && str != '\0' )

WolfPack 491 Posting Virtuoso Team Colleague

Well I tried building your project. Try putting all the function definitions in the same source file and the header seperate. If the errors I told you about in the previous reply are corrected, the project builds and runs okay. I am still searching for the reason for build failure for multiple source files. Will let you know if I find the solution.

WolfPack 491 Posting Virtuoso Team Colleague
void stackType<Type>::push(const Type& newItem)
{
  if(!isFullStack()) // You havent defined this member function.
    {
		list[stackTop] = newItem;
		stackTop++;
    }
    else
		cerr<<"Cannot add to a full stack."<<endl;
}

ALso

string rpn(string infix)

is not returning a string value.

WolfPack 491 Posting Virtuoso Team Colleague

Shouldnt

for (index = 9; index<0; index--)

be

for (index = 9; index>=0; index--)

. And since you are passing the size of the array use that instead of the hard coding 9. Like this

for (index = size; index>=0; index--)
WolfPack 491 Posting Virtuoso Team Colleague

No, your question is not stupid. If is one that occurs to all beginners in socket programming. Actually all 3 of your options are possible. So I will give you the answer for the first question which is I think the easiest and good to get some exposure to thread programming.

1) Wait for both a recv() and accept() at the same time (I think it's called multithreading, but I have no idea how to do it).

You have the CreateThread or _beginthread which is much easier than the former. You can do the accepting operation one thread and the receiving in another one. I think the Linux equivalent is pthread_create
Once you get to know threads this is the easiest to handle.

WolfPack 491 Posting Virtuoso Team Colleague

Yes it is possible. But the problem is you are not saving it to a variable in the main function. The variable

option

is declared inside the display_function so the main function does not know about it. Change your code as below and it will work.

#include "display.h"
int display_function(); //declaration of function outside main

main()
{
int userOption = display_function(); //call function

switch (userOption ){

case 1:
cout<<"Patients details can be added here"<<endl;
break;

case 2:
cout<<"Patient can be removed from here"<<endl;
break;
}

}

You can even use the name option instead of userOption, but I used this name to emphasis that it is different from the one declared in display_function().

WolfPack 491 Posting Virtuoso Team Colleague

(As a side note, my question was about enabling, and you aswnered how to disable, but I figured it out :P And it works)

Okay. My Bad. I pasted some code I had somewhere so forgot to change it.

Why the whole CMenu stuff. Why can't you just do?

EnableMenuItem(ID_MENUITEM_YOU_WANT_TO_ENABLE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);

Well it is like this. You can call CWnd::GetDlgItem directly because it is a member function of the CWnd class. So the appropriate function of your dialog window will be called even if you didnt specify the Object you are calling for.

In Contrast, the CMenu::EnableMenuItem function is not a member of the CWnd Class. It is a member of the CMenu Class. To call this inside the Dialog window, you will have to first get the handle for the object of the desired menu item using CWnd::GetMenu(). Actually what you get here is the pointer for the Menubar. Then use the CMenu::GetSubMenu to get the Menu you want and call the CMenu::EnableMenuItem() function.

WolfPack 491 Posting Virtuoso Team Colleague

Change the last line of your while loop to this

infile>>first>>last>>ss>>st_code;
WolfPack 491 Posting Virtuoso Team Colleague

maybe this will help.

SpS commented: Nice Link +1
WolfPack 491 Posting Virtuoso Team Colleague

Just for your information, GetDlgItem is used only for the child windows of the mother dialog. The menu is a separate entity. There for

GetDlgItem(IDM_FILE_TEST)

will return NULL and

GetDlgItem(IDM_FILE_TEST)->EnableWindow()

will fail.

WolfPack 491 Posting Virtuoso Team Colleague
CMenu* menu = GetMenu();
CMenu* submenu = menu->GetSubMenu(0);
submenu->EnableMenuItem(ID_MENUITEM_YOU_WANT_TO_ENABLE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
WolfPack 491 Posting Virtuoso Team Colleague

oops double postings. Sowwieee. :o

WolfPack 491 Posting Virtuoso Team Colleague

Made some modifications to your program.

enum letters {A = 'A', B, C, D, E, F, G, H ,I, J, K, L, M, N, O, P, R ,Q, S, T, U, V, W, X, Y, Z };

without this the value of A will be zero not ascii value of 'A'

string ICAO[26] = {"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot",  "Golf", "Hotel", "India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa","Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-Ray", "Yankee", "Zulu"};
void decipher(int len, char inputArray[], const string ICAO[])
{
letters match;
int i;

	for (i = 0; i < len; i++)
	{
		match = A; // Remember to Initialize your variables
		do
		{
			match = letters(match + 1);
		}while (inputArray[i] != match);

		cout << ICAO[match - A];
	}
	return;
}

And another thing. This will only work if you input capital letters. Modify it yourself for simple letters. You can do the decipering without the use of this while loop. Think again.

i dont quite understand why it wont work with len=0, i only have len =0 for a short time

but during that short time you are declaring a char array of zero elements.

char inputArray[len];

I dont think a compiler will allow that.

WolfPack 491 Posting Virtuoso Team Colleague
int len = 0;

Anything that uses

len

wont work while it is 0.

char inputArray[len];
	string2char(input, inputArray, len);
	errorCheck(inputArray, input, len, match);

	decipher(len,inputArray,ICAO,match);
string ICAO[25] = {"Alpha", "Bravo", "Charlie", "Delta", "Foxtrot", "Echo", "Golf", "Hotel", "India", "Juliet", "Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey","X-Ray", "Yankee", "Zulu"};

You have to transpose the entries in red.

WolfPack 491 Posting Virtuoso Team Colleague

Try this

plane* psave = NULL;
        psave = pbefore2->pnext;

	pbefore2->pnext = pbefore->pnext;
	psave->pnext = ptarget->pnext;

	ptarget->pnext = psave;


Correct the other mistakes I showed you in my previous reply and the one below.

if (ptarget = NULL)
	{
		cout << "Could not find flight number in the queue" << endl;
		return;
		cout << "ok inside next iff" << endl; //You wont reach this line also
	}

Check what happens if the target is within the first 2 nodes of the list. Wont it crash in that case? Run it and see.
Also try to use the STL list next time if possible.

WolfPack 491 Posting Virtuoso Team Colleague

Yes it is possible.

WolfPack 491 Posting Virtuoso Team Colleague

and give us the compile errors.

WolfPack 491 Posting Virtuoso Team Colleague
void bumpPlane  (plane*& pstart)
{
	int flight;
	cout << " Enter the flight number you would like to move ahead" << endl;
	cin >> flight;
	plane* ptarget = NULL;
	plane* pcurrent;
	pcurrent = pstart;
	plane* pbefore = NULL;

	if(pstart == NULL)
	{		// better to get used to using braces even if there is only one statement after the if condition
		cout << "No planes on the queue" << endl;
		 return; 		 // thought you might want to return if the list is empty 
	}


	while (pcurrent != NULL)
	{
		if(pcurrent->flightnum == flight)
		{
			ptarget = pcurrent;
			break;	// thought you might want to break the loop if a match is found
		}
		else
		{
			pbefore = pcurrent;
			pcurrent = pcurrent->pnext;

		}
	}
	if (ptarget ==  NULL)  // == not = ( this is one of the places where most newcomers get it wrong.  
	{
		cout << "Could not find flight number in the queue" << endl;
		return;
	}

	 // there is no error in here. But is this what you want to do?
	// At start
	//		---->A-----> B------> C 
	plane* psave = NULL;

	psave = pcurrent->pnext;

	pcurrent->pnext = pbefore;

	pbefore = psave;
	 // After the above code it becomes
	//	---->A-------------->C
	//	     |
	//	     B
	// You will not be able to reach B after this. Is that ok with your objective? 

}
WolfPack 491 Posting Virtuoso Team Colleague

Lets say you have a global variable and a local variable with the same name. When you compile it, the compiler will use the local variable, and not the global variable. If you prefix the variable name with ::[variablename], then the compile uses the global variable.

#include <iostream>

using namespace std;

int amount = 123;             // A global variable

int main()
{
   int amount = 456;          // A local variable
   cout  << ::amount << endl  // Print the global variable
         << amount << endl;   // Print the local variable
}

You can do this even for function names.
Note that you can use this to specify only global variables. Not the variables in the next outermost scope.

#include <iostream>

using namespace std;

int amount = 123;             // A global variable

int main()
{
	int amount = 1234 ; // the local variable in the outermost scope
	{
		int amount = 456; // A local variable
		cout  << "Innermost Scope" << endl ;
		cout  << ::amount << endl  // Print the global variable not the value with 1234
			<< amount << endl;   // Print the local variable in  current scope
	}
	cout  << "Outermost Scope" << endl ;
	cout  << ::amount << endl  // Print the global variable 
		<< amount << endl;   // Print the local variable in  current scope

}
WolfPack 491 Posting Virtuoso Team Colleague

And I dont consider producing code that could just as well be copy pasted from just about any project showing that he has tried to understand or solve the problem...

Well...determining this, is subject to the individual's intelligence so I need not comment.

and if you read his post you se that he says nothing about what operating system he is using, so I could just as well assume he was using linux and was nice enough to point out what to do if he was not...

What a valid assumption. Now it is all beginning to make sense. :rolleyes:

]Mind solving this one:
You guys I was given a task to solve the integer factorization problem efficiently, preferable using the general number field sieve, mind helping me out (look code, I have made an effort)..

#include <iostream>
#include <string>
int main( int argc, char **argv )
{
  std::string number ;
  std::cout << "What number do you want to factorize: " ;
  std::getline( std::cin, number ) ;
  std::string factors ;
  // so I'm stuck here, I could use some help implementing the general number field   
  // sieve, perferable in a easily paralizable manner so that I can use all my 
  // availible computers to solve the problem...
  // ofcourse if you have a faster algorithm for 100+ digits numbers I would appreciate
  // an implementation of that as well....
  std::cout << number << " factors into " << factors << std::endl ;
  return 0 ;
}

Saw that the …

WolfPack 491 Posting Virtuoso Team Colleague

Here is a running code. You will have to clean it up more.

// My First Internet Application
// By Matthew Cudmore, 2005

#include <iostream>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h> // For gethostname

#define MYPORT 4689
#define QUEMAX 10
#define BUFFER_LEN 100

#ifndef SOCKET_ERROR
#define SOCKET_ERROR -1
#endif
using namespace::std;

int main(void) 
{
	int sockfd, new_fd, sin_size;
	int sl = sizeof(struct sockaddr);
	struct sockaddr_in my_addr; // my address information
	struct sockaddr_in their_addr; // connector's address information

	// SOCK_STREAM or SOCK_DGRAM
	if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == SOCKET_ERROR )
	{
		// ERROR
		cout << "\n-- SOCKET error\n";
		return 0;
	}

	my_addr.sin_family = AF_INET;		// host byte order
	their_addr.sin_family = AF_INET;

	// Choose one method:
	// 1) my_addr.sin_port = htons(MYPORT); // short, network byte order
	// 2) my_addr.sin_port = htons(0);	// choose an unused port at random
	my_addr.sin_port = htons(MYPORT);	// short, network byte order
	their_addr.sin_port = htons(MYPORT);

	// Choose one method:
	// 1) my_addr.sin_addr.s_addr = inet_addr("10.12.110.57"); 
	// 2) inet_aton("10.12.110.57", &(my_addr.sin_addr));
	// 3) my_addr.sin_addr.s_addr = htonl(INADDR_ANY); // use my IP address
	my_addr.sin_addr.s_addr = htonl(INADDR_ANY); // use my IP address

	memset(&(my_addr.sin_zero), '\0', 8);	// zero the rest of the struct

	if (bind(sockfd, (struct sockaddr *)&my_addr,sizeof(struct sockaddr)) ==  SOCKET_ERROR) 
	{
		// ERROR
		cout << "\n-- BIND error\n";
		return 0;
	}

	// ###################################################################

	char Buffer[BUFFER_LEN];
	int BtsMvd;

	cout << "Simple sockets by Matthew Cudmore...\n";
	cout << "Your IP: " << inet_ntoa(my_addr.sin_addr) << "\n";

GetChoice:
		cout << "\nEnter choice action (x = exit, s = send, a = accept):
WolfPack 491 Posting Virtuoso Team Colleague

Ask a stupid question and youll get a stupid answer... btw it did solve the question: How do I find word in file with line nr...

Well I thought his question was detailed enough. After all he said

I need to write a program that asks the user to enter the filename, and then enter the string to search in that file. If the string is found within a file, the program should display that line and the line number.

and even produced some code of his own. Telling him to install mingw was a little better than telling him to remove windows and install Linux instead.

And how do you do those fancy modifications to quotes ? (with color and stuff?, whats the command?)

The use of tags.
CODE tags give the colour to the enclosed code. There ought to be instructions on how to use the tags somewhere in this site.

Btw IMO questions that would not have resulted in such a result would have been:
1) How do I read lines from a file?
1.5) (For stupid people) How do I know what line number I am at
2) How do I find a word in said line?
3) How do I print a line number and line to indicate found string?
3.5) (For stupid people) How do I add 1 + 2 + 3 to make a program that finds words in a file ? (I'm not sure this one …

WolfPack 491 Posting Virtuoso Team Colleague

no need to redo what has already been done
grep -n word file
or to use it in that context once you got the string do

char *arg[5] ;
arg[0] = "grep" ; arg[1] = "-n" ; arg[2] = string.c_str() ; arg[3] = fileName.c_str() ;
arg[4] = NULL ;
execvp(arg[0], arg) ;

(Your not using unix, when do one ever use console apps in windows ? go fetch mingw and tools )

What kind of answer is this?

WolfPack 491 Posting Virtuoso Team Colleague

how am i spamming the forum?

he he he :cheesy:. Sunny didnt mean you dude. Didnt you see the quote in his message? It was meant for that advertising fellow sam_dee who was trying to promote some company, maybe his, in these threads.

WolfPack 491 Posting Virtuoso Team Colleague

The declaration void getdata(ifstream fin); and its definition

int getdata(ifstream fin, ofstream fout)
{
...
}

does not match. You will get a link error.
Also I think I see a mismatch in the {} braces. This also should give you an EOF not found error. Use properly indented code, and you will catch most of these braces errors.

Those are some errors I see and there maybe more.
The other time you want us to find us the compiler errors, please post the error messages too. That is easy for us than copying and pasting your code and compiling it ourselves.

Use the CODE tags too. It makes the code more readable.

WolfPack 491 Posting Virtuoso Team Colleague

could it be that infile and outfile are not defined? It would help if you posted the compile errors.

outfile.open("report.txt");
infile.open("people3.txt");
WolfPack 491 Posting Virtuoso Team Colleague

WolfPack,

Thanks, it works the way I want it to. Tried to add to your reputation, but it wants me to spread it around some. Not sure what that means???

Dont worry man. It is the thought that counts. :D

WolfPack 491 Posting Virtuoso Team Colleague

For one thing the arrays go out of bounds when r = 0 or c = 0 or r = R or c = C.

for( r = 0 ; r < R; r++ )
{
	for(c=0;c<C;c++)
	{
		// gradients gx and gy (sobel)
		gx[r][c]=(imag[r-1][c-1]*1)+(imag[r-1][c]*0)+(imag[r-1][c+1]*-1)+(imag[r][c-1]*2)+(imag[r][c]*0)+(imag[r][c+1]*-2)+(imag[r+1][c-1]*1)+(imag[r+1][c]*0)+(imag[r+1][c+1]*-1);

		gy[r][c]=(imag[r-1][c-1]*1)+(imag[r-1][c]*2)+(imag[r-1][c+1]*1)+(imag[r][c-1]*0)+(imag[r][c]*0)+(imag[r][c+1]*0)+(imag[r+1][c-1]*-1)+(imag[r+1][c]*-2)+(imag[r+1][c+1]*-1);


		Vx[r][c]=0;
		Vy[r][c]=0;
		for(u=r-5;u<=r+5;u++) //10x10 window
		{
			for(v=c-5;v<=c+5;v++)
			{

				Vx[r][c]=Vx[r][c]+(2*(gx[u][v])*(gy[u][v]));

				Vy[r][c]=Vy[r][c]+((gx[u][v]*gx[u][v])*(gy[u][v]*gy[u][v]));
			}
		}


		if(Vx[r][c]==0)
		{
			thetaQ[r][c]=90;
		}
		else
		{
			thetaQ[r][c]=(0.5*(atan(Vy[r][c])/(Vx[r][c])));
		}
	}
}
WolfPack 491 Posting Virtuoso Team Colleague

What exactly does the code do that Wolfpack submitted?

It spins some characters. However Iam for the simpler method from Dave.

WolfPack 491 Posting Virtuoso Team Colleague

A start for windows. Modify to your requirements.Further Reference

#include <iostream>
#include <windows.h>
int main()
{
    DWORD dwWritten;
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_SCREEN_BUFFER_INFO  ConsoleScreenBufferInfo;

    GetConsoleScreenBufferInfo(hConsole, &ConsoleScreenBufferInfo);
    COORD coordCurrent = ConsoleScreenBufferInfo.dwCursorPosition;
    for ( int j = 0  ; j < 10  ; j++ )
    {
	FillConsoleOutputCharacter(hConsole, j + toascii('0'), 1, coordCurrent, &dwWritten);
	coordCurrent.X++;
	FillConsoleOutputCharacter(hConsole, toascii('9') - j  , 1, coordCurrent, &dwWritten);
	Sleep( 100 );
	coordCurrent.X--;
    }
    coordCurrent.X += 2;
    SetConsoleCursorPosition( hConsole,coordCurrent );
    std::cin.ignore();
    return 0;
}
WolfPack 491 Posting Virtuoso Team Colleague

Lol

WolfPack 491 Posting Virtuoso Team Colleague

I thought it was strspn(parameters); ?

Isn't that for SubString Search?

WolfPack 491 Posting Virtuoso Team Colleague

oops ;)

WolfPack 491 Posting Virtuoso Team Colleague

Loop until you find an EOF. Something like this?

while((ch = infile.get()) != eof )
		{
                         if ( ch != space )
                         {
                		 cout <<"\nRead value is : "<< ch<<endl;
	        	         cout << "calling function : ";
	                	 populateArray(ch, i);
                          } 
		 }
WolfPack 491 Posting Virtuoso Team Colleague

1. Add a Control Variable of type CStatic to the Static Control( lets say m_Caption )
2. Add a CFont Private Variable to the Main Dialog ( say m_Font )
3. At the OnInitDialog Function do this

m_Font.Detach();
	m_Font.CreatePointFont(360, "Arial", (GetDlgItem(IDC_PROGRESS_INDICATOR) )->GetDC());
	m_Caption.SetFont(&m_Font );
WolfPack 491 Posting Virtuoso Team Colleague
WolfPack 491 Posting Virtuoso Team Colleague

Thank you Dave. that is what my teacher told me as well.
i am quite new to c++.
where exactly do i include the spaces? how will the loops will look like?

cheers

Being new to C++ is not a factor here. Write down a Grid in paper. Any number of squares is okay as long as it is up to the requirements. Find out the numercial pattern, find the positions of the spaces and then convert it to variables. In short, write down an algorithm or pseudocode in plain English. This will not change with the language. Then start coding.

WolfPack 491 Posting Virtuoso Team Colleague

That is a mathematics question and explanation is lengthy. It is mostly used in numerical series. Best thing is to go to a mathematics site and search in it. Here is a sample

WolfPack 491 Posting Virtuoso Team Colleague

Check the beejs guide.

WolfPack 491 Posting Virtuoso Team Colleague

Hi,
Thank you very much for your reply.
i did use Sleep(20) but it doens't seem to work. Is there a wrong or a right way to do it? i am also wondering if the sleep fnc asynchronous?

gmv

It should work. The function will wait for at least 20 milliseconds. Was that the time you wanted the function to wait? THe Sleep function is independent of the other Processes or threads. It makes the calling thread wait for at least the time specified.

WolfPack 491 Posting Virtuoso Team Colleague

hi

i am doing a project and i would like to know if anyone can please tell me how to write a delay or wait function in c++ which works asynchronously with other programs. :confused: Thank you for ur help.

gmv

Use Sleep( int waitTime ) in windows. It has only a resolution of 1 millisecond however. Dont know about cases when you want to wait for shorter times.

WolfPack 491 Posting Virtuoso Team Colleague

The ShellExecute API is used to perform an operation on a specifed file. In this case the "open" operation. After performing the desired operation, it returns to the calling function. It does not wait till the batch file commands have finished running.
Executing the batch file using the system function did not work because the system function did not return to the calling function ( main )while the batch commands are running.