Solved

C++ Builder Question..

Posted on 2000-04-19
2
225 Views
Last Modified: 2010-04-02
Hi There,
I have a program, which is now working because of DrDelphi and AlexVirochovsky

I now have a problem.  would anyone know how to call run a function main of a program added into a C++ Builder Project.  I have Parse.cpp and I need to run that from Check syntax on my Main form.  Thanks for all the help so far and  any other help.

Elmo_
0
Comment
Question by:Elmo_
2 Comments
 
LVL 1

Expert Comment

by:jbodom
ID: 2732685
If you're talking about running an executable from your current program, then have a look at Winapi function ShellExecute:

// include SHLOBJ.H in your CPP file.
#include <shlobj.h>

ShellExecute(Handle, "open", "yourprogam.exe", 0, "C:\\yourdirectory", "parameters","defaultdirectory",SW_HIDE);
 
0
 
LVL 1

Accepted Solution

by:
Jmccp earned 40 total points
ID: 2732727
First of all you should go to Projects and add the Parse.cpp file to your project.  Next,add the #include "Parse.cpp" or "Parse.h" if it has a header file at the top of your main form with the other includes.  Then you should be able to call the function(s) in Parse.cpp

Jim
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question